home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / plain / contrib / tb0tree.tex / tb0tree.html
LaTeX Document  |  1989-11-22  |  19.8 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: LaTeX Document (document/latex).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
90% dexvert Hypertext Markup Language File (text/html) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file HTML document text default (weak)
99% file LaTeX document text default
98% file LaTeX auxiliary file default
97% file exported SGML document text default
96% file exported SGML document, ASCII text default
80% TrID HyperText Markup Language with DOCTYPE default
19% TrID HyperText Markup Language default
100% perlTextCheck Likely Text (Perl) default
100% gt2 HTML (Hyper Text Markup Language) Datei default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime text/html default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3c 21 44 4f 43 54 59 50 | 45 20 68 74 6d 6c 20 50 |<!DOCTYP|E html P|
|00000010| 55 42 4c 49 43 20 22 2d | 2f 2f 57 33 43 2f 2f 44 |UBLIC "-|//W3C//D|
|00000020| 54 44 20 48 54 4d 4c 20 | 34 2e 30 31 20 54 72 61 |TD HTML |4.01 Tra|
|00000030| 6e 73 69 74 69 6f 6e 61 | 6c 2f 2f 45 4e 22 20 22 |nsitiona|l//EN" "|
|00000040| 68 74 74 70 3a 2f 2f 77 | 77 77 2e 77 33 2e 6f 72 |http://w|ww.w3.or|
|00000050| 67 2f 54 52 2f 68 74 6d | 6c 34 2f 6c 6f 6f 73 65 |g/TR/htm|l4/loose|
|00000060| 2e 64 74 64 22 3e 0a 3c | 68 74 6d 6c 3e 0a 3c 21 |.dtd">.<|html>.<!|
|00000070| 2d 2d 20 43 72 65 61 74 | 65 64 20 6f 6e 20 4e 6f |-- Creat|ed on No|
|00000080| 76 65 6d 62 65 72 20 32 | 34 2c 20 32 30 32 34 20 |vember 2|4, 2024 |
|00000090| 62 79 20 74 65 78 69 32 | 68 74 6d 6c 20 35 2e 30 |by texi2|html 5.0|
|000000a0| 0a 74 65 78 69 32 68 74 | 6d 6c 20 77 61 73 20 77 |.texi2ht|ml was w|
|000000b0| 72 69 74 74 65 6e 20 62 | 79 3a 20 0a 20 20 20 20 |ritten b|y: . |
|000000c0| 20 20 20 20 20 20 20 20 | 4c 69 6f 6e 65 6c 20 43 | |Lionel C|
|000000d0| 6f 6e 73 20 3c 4c 69 6f | 6e 65 6c 2e 43 6f 6e 73 |ons <Lio|nel.Cons|
|000000e0| 40 63 65 72 6e 2e 63 68 | 3e 20 28 6f 72 69 67 69 |@cern.ch|> (origi|
|000000f0| 6e 61 6c 20 61 75 74 68 | 6f 72 29 0a 20 20 20 20 |nal auth|or). |
|00000100| 20 20 20 20 20 20 20 20 | 4b 61 72 6c 20 42 65 72 | |Karl Ber|
|00000110| 72 79 20 20 3c 6b 61 72 | 6c 40 66 72 65 65 66 72 |ry <kar|l@freefr|
|00000120| 69 65 6e 64 73 2e 6f 72 | 67 3e 0a 20 20 20 20 20 |iends.or|g>. |
|00000130| 20 20 20 20 20 20 20 4f | 6c 61 66 20 42 61 63 68 | O|laf Bach|
|00000140| 6d 61 6e 6e 20 3c 6f 62 | 61 63 68 6d 61 6e 40 6d |mann <ob|achman@m|
|00000150| 61 74 68 65 6d 61 74 69 | 6b 2e 75 6e 69 2d 6b 6c |athemati|k.uni-kl|
|00000160| 2e 64 65 3e 0a 20 20 20 | 20 20 20 20 20 20 20 20 |.de>. | |
|00000170| 20 61 6e 64 20 6d 61 6e | 79 20 6f 74 68 65 72 73 | and man|y others|
|00000180| 2e 0a 4d 61 69 6e 74 61 | 69 6e 65 64 20 62 79 3a |..Mainta|ined by:|
|00000190| 20 4d 61 6e 79 20 63 72 | 65 61 74 69 76 65 20 70 | Many cr|eative p|
|000001a0| 65 6f 70 6c 65 2e 0a 53 | 65 6e 64 20 62 75 67 73 |eople..S|end bugs|
|000001b0| 20 61 6e 64 20 73 75 67 | 67 65 73 74 69 6f 6e 73 | and sug|gestions|
|000001c0| 20 74 6f 20 3c 74 65 78 | 69 32 68 74 6d 6c 2d 62 | to <tex|i2html-b|
|000001d0| 75 67 40 6e 6f 6e 67 6e | 75 2e 6f 72 67 3e 0a 2d |ug@nongn|u.org>.-|
|000001e0| 2d 3e 0a 3c 68 65 61 64 | 3e 0a 3c 74 69 74 6c 65 |->.<head|>.<title|
|000001f0| 3e 55 6e 74 69 74 6c 65 | 64 20 44 6f 63 75 6d 65 |>Untitle|d Docume|
|00000200| 6e 74 3c 2f 74 69 74 6c | 65 3e 0a 0a 3c 6d 65 74 |nt</titl|e>..<met|
|00000210| 61 20 6e 61 6d 65 3d 22 | 64 65 73 63 72 69 70 74 |a name="|descript|
|00000220| 69 6f 6e 22 20 63 6f 6e | 74 65 6e 74 3d 22 55 6e |ion" con|tent="Un|
|00000230| 74 69 74 6c 65 64 20 44 | 6f 63 75 6d 65 6e 74 22 |titled D|ocument"|
|00000240| 3e 0a 3c 6d 65 74 61 20 | 6e 61 6d 65 3d 22 6b 65 |>.<meta |name="ke|
|00000250| 79 77 6f 72 64 73 22 20 | 63 6f 6e 74 65 6e 74 3d |ywords" |content=|
|00000260| 22 55 6e 74 69 74 6c 65 | 64 20 44 6f 63 75 6d 65 |"Untitle|d Docume|
|00000270| 6e 74 22 3e 0a 3c 6d 65 | 74 61 20 6e 61 6d 65 3d |nt">.<me|ta name=|
|00000280| 22 72 65 73 6f 75 72 63 | 65 2d 74 79 70 65 22 20 |"resourc|e-type" |
|00000290| 63 6f 6e 74 65 6e 74 3d | 22 64 6f 63 75 6d 65 6e |content=|"documen|
|000002a0| 74 22 3e 0a 3c 6d 65 74 | 61 20 6e 61 6d 65 3d 22 |t">.<met|a name="|
|000002b0| 64 69 73 74 72 69 62 75 | 74 69 6f 6e 22 20 63 6f |distribu|tion" co|
|000002c0| 6e 74 65 6e 74 3d 22 67 | 6c 6f 62 61 6c 22 3e 0a |ntent="g|lobal">.|
|000002d0| 3c 6d 65 74 61 20 6e 61 | 6d 65 3d 22 47 65 6e 65 |<meta na|me="Gene|
|000002e0| 72 61 74 6f 72 22 20 63 | 6f 6e 74 65 6e 74 3d 22 |rator" c|ontent="|
|000002f0| 74 65 78 69 32 68 74 6d | 6c 20 35 2e 30 22 3e 0a |texi2htm|l 5.0">.|
|00000300| 3c 6d 65 74 61 20 68 74 | 74 70 2d 65 71 75 69 76 |<meta ht|tp-equiv|
|00000310| 3d 22 43 6f 6e 74 65 6e | 74 2d 54 79 70 65 22 20 |="Conten|t-Type" |
|00000320| 63 6f 6e 74 65 6e 74 3d | 22 74 65 78 74 2f 68 74 |content=|"text/ht|
|00000330| 6d 6c 3b 20 63 68 61 72 | 73 65 74 3d 75 74 66 2d |ml; char|set=utf-|
|00000340| 38 22 3e 0a 3c 73 74 79 | 6c 65 20 74 79 70 65 3d |8">.<sty|le type=|
|00000350| 22 74 65 78 74 2f 63 73 | 73 22 3e 0a 3c 21 2d 2d |"text/cs|s">.<!--|
|00000360| 0a 61 2e 73 75 6d 6d 61 | 72 79 2d 6c 65 74 74 65 |.a.summa|ry-lette|
|00000370| 72 20 7b 74 65 78 74 2d | 64 65 63 6f 72 61 74 69 |r {text-|decorati|
|00000380| 6f 6e 3a 20 6e 6f 6e 65 | 7d 0a 62 6c 6f 63 6b 71 |on: none|}.blockq|
|00000390| 75 6f 74 65 2e 73 6d 61 | 6c 6c 71 75 6f 74 61 74 |uote.sma|llquotat|
|000003a0| 69 6f 6e 20 7b 66 6f 6e | 74 2d 73 69 7a 65 3a 20 |ion {fon|t-size: |
|000003b0| 73 6d 61 6c 6c 65 72 7d | 0a 64 69 76 2e 64 69 73 |smaller}|.div.dis|
|000003c0| 70 6c 61 79 20 7b 6d 61 | 72 67 69 6e 2d 6c 65 66 |play {ma|rgin-lef|
|000003d0| 74 3a 20 33 2e 32 65 6d | 7d 0a 64 69 76 2e 65 78 |t: 3.2em|}.div.ex|
|000003e0| 61 6d 70 6c 65 20 7b 6d | 61 72 67 69 6e 2d 6c 65 |ample {m|argin-le|
|000003f0| 66 74 3a 20 33 2e 32 65 | 6d 7d 0a 64 69 76 2e 6c |ft: 3.2e|m}.div.l|
|00000400| 69 73 70 20 7b 6d 61 72 | 67 69 6e 2d 6c 65 66 74 |isp {mar|gin-left|
|00000410| 3a 20 33 2e 32 65 6d 7d | 0a 64 69 76 2e 73 6d 61 |: 3.2em}|.div.sma|
|00000420| 6c 6c 64 69 73 70 6c 61 | 79 20 7b 6d 61 72 67 69 |lldispla|y {margi|
|00000430| 6e 2d 6c 65 66 74 3a 20 | 33 2e 32 65 6d 7d 0a 64 |n-left: |3.2em}.d|
|00000440| 69 76 2e 73 6d 61 6c 6c | 65 78 61 6d 70 6c 65 20 |iv.small|example |
|00000450| 7b 6d 61 72 67 69 6e 2d | 6c 65 66 74 3a 20 33 2e |{margin-|left: 3.|
|00000460| 32 65 6d 7d 0a 64 69 76 | 2e 73 6d 61 6c 6c 6c 69 |2em}.div|.smallli|
|00000470| 73 70 20 7b 6d 61 72 67 | 69 6e 2d 6c 65 66 74 3a |sp {marg|in-left:|
|00000480| 20 33 2e 32 65 6d 7d 0a | 70 72 65 2e 64 69 73 70 | 3.2em}.|pre.disp|
|00000490| 6c 61 79 20 7b 66 6f 6e | 74 2d 66 61 6d 69 6c 79 |lay {fon|t-family|
|000004a0| 3a 20 73 65 72 69 66 7d | 0a 70 72 65 2e 66 6f 72 |: serif}|.pre.for|
|000004b0| 6d 61 74 20 7b 66 6f 6e | 74 2d 66 61 6d 69 6c 79 |mat {fon|t-family|
|000004c0| 3a 20 73 65 72 69 66 7d | 0a 70 72 65 2e 6d 65 6e |: serif}|.pre.men|
|000004d0| 75 2d 63 6f 6d 6d 65 6e | 74 20 7b 66 6f 6e 74 2d |u-commen|t {font-|
|000004e0| 66 61 6d 69 6c 79 3a 20 | 73 65 72 69 66 7d 0a 70 |family: |serif}.p|
|000004f0| 72 65 2e 6d 65 6e 75 2d | 70 72 65 66 6f 72 6d 61 |re.menu-|preforma|
|00000500| 74 74 65 64 20 7b 66 6f | 6e 74 2d 66 61 6d 69 6c |tted {fo|nt-famil|
|00000510| 79 3a 20 73 65 72 69 66 | 7d 0a 70 72 65 2e 73 6d |y: serif|}.pre.sm|
|00000520| 61 6c 6c 64 69 73 70 6c | 61 79 20 7b 66 6f 6e 74 |alldispl|ay {font|
|00000530| 2d 66 61 6d 69 6c 79 3a | 20 73 65 72 69 66 3b 20 |-family:| serif; |
|00000540| 66 6f 6e 74 2d 73 69 7a | 65 3a 20 73 6d 61 6c 6c |font-siz|e: small|
|00000550| 65 72 7d 0a 70 72 65 2e | 73 6d 61 6c 6c 65 78 61 |er}.pre.|smallexa|
|00000560| 6d 70 6c 65 20 7b 66 6f | 6e 74 2d 73 69 7a 65 3a |mple {fo|nt-size:|
|00000570| 20 73 6d 61 6c 6c 65 72 | 7d 0a 70 72 65 2e 73 6d | smaller|}.pre.sm|
|00000580| 61 6c 6c 66 6f 72 6d 61 | 74 20 7b 66 6f 6e 74 2d |allforma|t {font-|
|00000590| 66 61 6d 69 6c 79 3a 20 | 73 65 72 69 66 3b 20 66 |family: |serif; f|
|000005a0| 6f 6e 74 2d 73 69 7a 65 | 3a 20 73 6d 61 6c 6c 65 |ont-size|: smalle|
|000005b0| 72 7d 0a 70 72 65 2e 73 | 6d 61 6c 6c 6c 69 73 70 |r}.pre.s|malllisp|
|000005c0| 20 7b 66 6f 6e 74 2d 73 | 69 7a 65 3a 20 73 6d 61 | {font-s|ize: sma|
|000005d0| 6c 6c 65 72 7d 0a 73 70 | 61 6e 2e 6e 6f 63 6f 64 |ller}.sp|an.nocod|
|000005e0| 65 62 72 65 61 6b 20 7b | 77 68 69 74 65 2d 73 70 |ebreak {|white-sp|
|000005f0| 61 63 65 3a 70 72 65 7d | 0a 73 70 61 6e 2e 6e 6f |ace:pre}|.span.no|
|00000600| 6c 69 6e 65 62 72 65 61 | 6b 20 7b 77 68 69 74 65 |linebrea|k {white|
|00000610| 2d 73 70 61 63 65 3a 70 | 72 65 7d 0a 73 70 61 6e |-space:p|re}.span|
|00000620| 2e 72 6f 6d 61 6e 20 7b | 66 6f 6e 74 2d 66 61 6d |.roman {|font-fam|
|00000630| 69 6c 79 3a 73 65 72 69 | 66 3b 20 66 6f 6e 74 2d |ily:seri|f; font-|
|00000640| 77 65 69 67 68 74 3a 6e | 6f 72 6d 61 6c 7d 0a 73 |weight:n|ormal}.s|
|00000650| 70 61 6e 2e 73 61 6e 73 | 73 65 72 69 66 20 7b 66 |pan.sans|serif {f|
|00000660| 6f 6e 74 2d 66 61 6d 69 | 6c 79 3a 73 61 6e 73 2d |ont-fami|ly:sans-|
|00000670| 73 65 72 69 66 3b 20 66 | 6f 6e 74 2d 77 65 69 67 |serif; f|ont-weig|
|00000680| 68 74 3a 6e 6f 72 6d 61 | 6c 7d 0a 75 6c 2e 6e 6f |ht:norma|l}.ul.no|
|00000690| 2d 62 75 6c 6c 65 74 20 | 7b 6c 69 73 74 2d 73 74 |-bullet |{list-st|
|000006a0| 79 6c 65 3a 20 6e 6f 6e | 65 7d 0a 2d 2d 3e 0a 3c |yle: non|e}.-->.<|
|000006b0| 2f 73 74 79 6c 65 3e 0a | 0a 0a 3c 2f 68 65 61 64 |/style>.|..</head|
|000006c0| 3e 0a 0a 3c 62 6f 64 79 | 20 6c 61 6e 67 3d 22 65 |>..<body| lang="e|
|000006d0| 6e 22 20 62 67 63 6f 6c | 6f 72 3d 22 23 46 46 46 |n" bgcol|or="#FFF|
|000006e0| 46 46 46 22 20 74 65 78 | 74 3d 22 23 30 30 30 30 |FFF" tex|t="#0000|
|000006f0| 30 30 22 20 6c 69 6e 6b | 3d 22 23 30 30 30 30 46 |00" link|="#0000F|
|00000700| 46 22 20 76 6c 69 6e 6b | 3d 22 23 38 30 30 30 38 |F" vlink|="#80008|
|00000710| 30 22 20 61 6c 69 6e 6b | 3d 22 23 46 46 30 30 30 |0" alink|="#FF000|
|00000720| 30 22 3e 0a 0a 3c 70 3e | 25 20 4e 6f 77 20 74 68 |0">..<p>|% Now th|
|00000730| 65 20 70 61 70 65 72 20 | 69 74 73 65 6c 66 0a 3c |e paper |itself.<|
|00000740| 2f 70 3e 0a 3c 70 3e 7b | 5c 6f 62 65 79 73 70 61 |/p>.<p>{|\obeyspa|
|00000750| 63 65 73 5c 67 64 65 66 | 20 7b 5c 69 66 76 6d 6f |ces\gdef| {\ifvmo|
|00000760| 64 65 5c 69 6e 64 65 6e | 74 5c 66 69 5c 73 70 61 |de\inden|t\fi\spa|
|00000770| 63 65 0a 7b 5c 63 61 74 | 63 6f 64 65 20 26 6c 73 |ce.{\cat|code &ls|
|00000780| 71 75 6f 3b 7c 3d 30 20 | 5c 63 61 74 63 6f 64 65 |quo;|=0 |\catcode|
|00000790| 26 6c 73 71 75 6f 3b 5c | 5c 3d 31 32 20 7c 67 64 |&lsquo;\|\=12 |gd|
|000007a0| 65 66 7c 76 62 61 72 67 | 23 31 5c 65 6e 64 76 62 |ef|vbarg|#1\endvb|
|000007b0| 7b 23 31 7c 65 6e 64 67 | 72 6f 75 70 7c 6d 65 64 |{#1|endg|roup|med|
|000007c0| 73 6b 69 70 0a 5c 64 65 | 66 5c 6d 61 6b 65 6f 74 |skip.\de|f\makeot|
|000007d0| 68 65 72 23 31 7b 5c 63 | 61 74 63 6f 64 65 26 6c |her#1{\c|atcode&l|
|000007e0| 73 71 75 6f 3b 23 31 31 | 32 5c 72 65 6c 61 78 0a |squo;#11|2\relax.|
|000007f0| 5c 64 65 66 5c 76 62 7b | 5c 6d 65 64 73 6b 69 70 |\def\vb{|\medskip|
|00000800| 20 5c 62 65 67 69 6e 67 | 72 6f 75 70 20 5c 76 65 | \beging|roup \ve|
|00000810| 72 62 20 5c 6f 62 65 79 | 6c 69 6e 65 73 20 5c 6f |rb \obey|lines \o|
|00000820| 62 65 79 73 70 61 63 65 | 73 20 5c 74 74 20 5c 76 |beyspace|s \tt \v|
|00000830| 62 61 72 67 0a 5c 64 65 | 66 5c 76 65 72 62 7b 5c |barg.\de|f\verb{\|
|00000840| 6c 65 74 5c 64 6f 5c 6d | 61 6b 65 6f 74 68 65 72 |let\do\m|akeother|
|00000850| 20 5c 64 6f 73 70 65 63 | 69 61 6c 73 0a 5c 63 61 | \dospec|ials.\ca|
|00000860| 74 63 6f 64 65 26 6c 73 | 71 75 6f 3b 5c 2a 3d 5c |tcode&ls|quo;\*=\|
|00000870| 61 63 74 69 76 65 0a 5c | 64 65 66 2a 7b 5c 62 65 |active.\|def*{\be|
|00000880| 67 69 6e 67 72 6f 75 70 | 5c 76 65 72 62 5c 74 74 |gingroup|\verb\tt|
|00000890| 5c 64 6f 73 74 61 72 0a | 5c 64 65 66 5c 64 6f 73 |\dostar.|\def\dos|
|000008a0| 74 61 72 23 31 2a 7b 23 | 31 5c 65 6e 64 67 72 6f |tar#1*{#|1\endgro|
|000008b0| 75 70 0a 3c 2f 70 3e 0a | 3c 70 3e 25 20 5c 63 65 |up.</p>.|<p>% \ce|
|000008c0| 6e 74 65 72 6c 69 6e 65 | 7b 5c 62 66 20 54 72 65 |nterline|{\bf Tre|
|000008d0| 65 73 20 69 6e 20 5c 54 | 65 58 0a 25 20 5c 63 65 |es in \T|eX.% \ce|
|000008e0| 6e 74 65 72 6c 69 6e 65 | 7b 44 61 76 69 64 20 45 |nterline|{David E|
|000008f0| 70 70 73 74 65 69 6e 3b | 20 46 65 62 72 75 61 72 |ppstein;| Februar|
|00000900| 79 20 36 2c 20 31 39 38 | 35 0a 3c 2f 70 3e 0a 3c |y 6, 198|5.</p>.<|
|00000910| 70 3e 5c 62 65 67 69 6e | 73 65 63 74 69 6f 6e 20 |p>\begin|section |
|00000920| 49 6e 74 72 6f 64 75 63 | 74 69 6f 6e 0a 3c 2f 70 |Introduc|tion.</p|
|00000930| 3e 0a 3c 70 3e 54 68 65 | 72 65 20 61 72 65 20 6d |>.<p>The|re are m|
|00000940| 61 6e 79 20 70 6f 73 73 | 69 62 6c 65 20 75 73 65 |any poss|ible use|
|00000950| 73 20 66 6f 72 20 74 72 | 65 65 73 20 69 6e 20 74 |s for tr|ees in t|
|00000960| 79 70 65 73 65 74 20 74 | 65 78 74 2e 20 20 54 68 |ypeset t|ext. Th|
|00000970| 65 20 66 6f 6c 6c 6f 77 | 69 6e 67 0a 74 61 78 6f |e follow|ing.taxo|
|00000980| 6e 6f 6d 79 20 69 6c 6c | 75 73 74 72 61 74 65 73 |nomy ill|ustrates|
|00000990| 20 73 6f 6d 65 20 6f 66 | 20 74 68 65 6d 2e 0a 3c | some of| them..<|
|000009a0| 2f 70 3e 0a 3c 70 3e 5c | 74 72 65 65 0a 20 20 54 |/p>.<p>\|tree. T|
|000009b0| 72 65 65 0a 20 20 55 73 | 65 73 0a 3c 2f 70 3e 0a |ree. Us|es.</p>.|
|000009c0| 3c 70 3e 20 20 5c 73 75 | 62 74 72 65 65 0a 20 20 |<p> \su|btree. |
|000009d0| 20 20 43 6f 6d 70 75 74 | 65 72 0a 20 20 20 20 53 | Comput|er. S|
|000009e0| 63 69 65 6e 63 65 0a 3c | 2f 70 3e 0a 3c 70 3e 20 |cience.<|/p>.<p> |
|000009f0| 20 20 20 5c 73 75 62 74 | 72 65 65 0a 20 20 20 20 | \subt|ree. |
|00000a00| 20 20 44 61 74 61 0a 20 | 20 20 20 20 20 53 74 72 | Data. | Str|
|00000a10| 75 63 74 75 72 65 73 0a | 3c 2f 70 3e 20 20 20 20 |uctures.|</p> |
|00000a20| 20 20 0a 3c 70 3e 20 20 | 20 20 20 20 5c 6c 65 61 | .<p> | \lea|
|00000a30| 66 7b 53 65 61 72 63 68 | 20 54 72 65 65 0a 20 20 |f{Search| Tree. |
|00000a40| 20 20 20 20 5c 6c 65 61 | 66 7b 50 72 69 6f 72 69 | \lea|f{Priori|
|00000a50| 74 79 20 51 75 65 75 65 | 0a 20 20 20 20 5c 65 6e |ty Queue|. \en|
|00000a60| 64 73 75 62 74 72 65 65 | 0a 3c 2f 70 3e 0a 3c 70 |dsubtree|.</p>.<p|
|00000a70| 3e 20 20 20 20 5c 73 75 | 62 74 72 65 65 0a 20 20 |> \su|btree. |
|00000a80| 20 20 20 20 50 61 72 73 | 69 6e 67 0a 3c 2f 70 3e | Pars|ing.</p>|
|00000a90| 0a 3c 70 3e 20 20 20 20 | 20 20 5c 6c 65 61 66 7b |.<p> | \leaf{|
|00000aa0| 50 61 72 73 65 20 54 72 | 65 65 0a 20 20 20 20 20 |Parse Tr|ee. |
|00000ab0| 20 5c 6c 65 61 66 7b 53 | 79 6d 62 6f 6c 20 54 61 | \leaf{S|ymbol Ta|
|00000ac0| 62 6c 65 0a 20 20 20 20 | 5c 65 6e 64 73 75 62 74 |ble. |\endsubt|
|00000ad0| 72 65 65 0a 3c 2f 70 3e | 0a 3c 70 3e 20 20 20 20 |ree.</p>|.<p> |
|00000ae0| 5c 73 75 62 74 72 65 65 | 0a 20 20 20 20 20 20 53 |\subtree|. S|
|00000af0| 74 72 75 63 74 75 72 65 | 64 0a 20 20 20 20 20 20 |tructure|d. |
|00000b00| 50 72 6f 67 72 61 6d 6d | 69 6e 67 0a 20 20 20 20 |Programm|ing. |
|00000b10| 5c 65 6e 64 73 75 62 74 | 72 65 65 0a 20 20 5c 65 |\endsubt|ree. \e|
|00000b20| 6e 64 73 75 62 74 72 65 | 65 0a 3c 2f 70 3e 0a 3c |ndsubtre|e.</p>.<|
|00000b30| 70 3e 20 20 5c 73 75 62 | 74 72 65 65 0a 20 20 20 |p> \sub|tree. |
|00000b40| 20 47 65 6e 65 61 6c 6f | 67 79 0a 20 20 20 20 5c | Genealo|gy. \|
|00000b50| 6c 65 61 66 7b 41 6e 63 | 65 73 74 6f 72 73 0a 20 |leaf{Anc|estors. |
|00000b60| 20 20 20 5c 6c 65 61 66 | 7b 44 65 73 63 65 6e 64 | \leaf|{Descend|
|00000b70| 61 6e 74 73 0a 20 20 5c | 65 6e 64 73 75 62 74 72 |ants. \|endsubtr|
|00000b80| 65 65 0a 3c 2f 70 3e 0a | 3c 70 3e 20 20 5c 73 75 |ee.</p>.|<p> \su|
|00000b90| 62 74 72 65 65 0a 20 20 | 20 20 54 61 78 6f 6e 6f |btree. | Taxono|
|00000ba0| 6d 69 65 73 0a 20 20 20 | 20 5c 6c 65 61 66 7b 54 |mies. | \leaf{T|
|00000bb0| 72 65 65 20 55 73 65 73 | 0a 20 20 5c 65 6e 64 73 |ree Uses|. \ends|
|00000bc0| 75 62 74 72 65 65 0a 5c | 65 6e 64 74 72 65 65 0a |ubtree.\|endtree.|
|00000bd0| 3c 2f 70 3e 0a 3c 70 3e | 55 6e 66 6f 72 74 75 6e |</p>.<p>|Unfortun|
|00000be0| 61 74 65 6c 79 20 5c 54 | 65 58 5c 20 70 72 6f 76 |ately \T|eX\ prov|
|00000bf0| 69 64 65 73 20 6e 6f 20 | 65 61 73 79 20 77 61 79 |ides no |easy way|
|00000c00| 20 74 6f 20 74 79 70 65 | 73 65 74 20 73 75 63 68 | to type|set such|
|00000c10| 20 74 72 65 65 73 2e 0a | 4f 6e 65 20 70 6f 73 73 | trees..|One poss|
|00000c20| 69 62 6c 65 20 6d 65 74 | 68 6f 64 20 69 73 20 67 |ible met|hod is g|
|00000c30| 69 76 65 6e 20 69 6e 20 | 65 78 65 72 63 69 73 65 |iven in |exercise|
|00000c40| 20 32 32 2e 31 34 20 6f | 66 20 74 68 65 20 5c 54 | 22.14 o|f the \T|
|00000c50| 65 58 20 62 6f 6f 6b 3a | 20 75 73 69 6e 67 0a 5c |eX book:| using.\|
|00000c60| 54 65 58 26 72 73 71 75 | 6f 3b 73 20 61 6c 69 67 |TeX&rsqu|o;s alig|
|00000c70| 6e 6d 65 6e 74 20 70 72 | 69 6d 69 74 69 76 65 73 |nment pr|imitives|
|00000c80| 20 62 79 20 68 61 6e 64 | 2e 20 20 54 68 69 73 20 | by hand|. This |
|00000c90| 6d 65 74 68 6f 64 20 62 | 65 63 6f 6d 65 73 20 76 |method b|ecomes v|
|00000ca0| 65 72 79 20 63 6c 75 6d | 73 79 20 61 73 20 74 68 |ery clum|sy as th|
|00000cb0| 65 0a 74 72 65 65 73 20 | 67 72 6f 77 2c 20 68 6f |e.trees |grow, ho|
|00000cc0| 77 65 76 65 72 2e 20 20 | 41 20 6d 6f 72 65 20 67 |wever. |A more g|
|00000cd0| 65 6e 65 72 61 6c 20 74 | 65 63 68 6e 69 71 75 65 |eneral t|echnique|
|00000ce0| 20 69 73 20 74 6f 20 77 | 72 69 74 65 20 61 20 73 | is to w|rite a s|
|00000cf0| 65 74 20 6f 66 20 74 72 | 65 65 0a 63 6f 6e 73 74 |et of tr|ee.const|
|00000d00| 72 75 63 74 69 6f 6e 20 | 6d 61 63 72 6f 73 3b 20 |ruction |macros; |
|00000d10| 74 68 61 74 20 69 73 20 | 74 68 65 20 61 70 70 72 |that is |the appr|
|00000d20| 6f 61 63 68 20 74 61 6b | 65 6e 20 69 6e 20 74 68 |oach tak|en in th|
|00000d30| 69 73 20 70 61 70 65 72 | 2e 20 20 54 68 65 0a 74 |is paper|. The.t|
|00000d40| 61 78 6f 6e 6f 6d 79 20 | 61 62 6f 76 65 20 77 61 |axonomy |above wa|
|00000d50| 73 20 74 79 70 65 73 65 | 74 20 77 69 74 68 20 74 |s typese|t with t|
|00000d60| 68 65 20 66 6f 6c 6c 6f | 77 69 6e 67 20 69 6e 70 |he follo|wing inp|
|00000d70| 75 74 3a 0a 3c 2f 70 3e | 0a 3c 70 3e 5c 76 62 0a |ut:.</p>|.<p>\vb.|
|00000d80| 5c 74 72 65 65 0a 20 20 | 54 72 65 65 0a 20 20 55 |\tree. |Tree. U|
|00000d90| 73 65 73 0a 3c 2f 70 3e | 0a 3c 70 3e 20 20 5c 73 |ses.</p>|.<p> \s|
|00000da0| 75 62 74 72 65 65 0a 20 | 20 20 20 43 6f 6d 70 75 |ubtree. | Compu|
|00000db0| 74 65 72 0a 20 20 20 20 | 53 63 69 65 6e 63 65 0a |ter. |Science.|
|00000dc0| 3c 2f 70 3e 0a 3c 70 3e | 20 20 20 20 5c 73 75 62 |</p>.<p>| \sub|
|00000dd0| 74 72 65 65 0a 20 20 20 | 20 20 20 44 61 74 61 0a |tree. | Data.|
|00000de0| 20 20 20 20 20 20 53 74 | 72 75 63 74 75 72 65 73 | St|ructures|
|00000df0| 0a 3c 2f 70 3e 0a 3c 70 | 3e 20 20 20 20 20 20 5c |.</p>.<p|> \|
|00000e00| 6c 65 61 66 7b 53 65 61 | 72 63 68 20 54 72 65 65 |leaf{Sea|rch Tree|
|00000e10| 0a 20 20 20 20 20 20 5c | 6c 65 61 66 7b 50 72 69 |. \|leaf{Pri|
|00000e20| 6f 72 69 74 79 20 51 75 | 65 75 65 0a 20 20 20 20 |ority Qu|eue. |
|00000e30| 5c 65 6e 64 73 75 62 74 | 72 65 65 0a 20 20 20 20 |\endsubt|ree. |
|00000e40| 2e 2e 2e 0a 20 20 5c 65 | 6e 64 73 75 62 74 72 65 |.... \e|ndsubtre|
|00000e50| 65 0a 20 20 2e 2e 2e 0a | 5c 65 6e 64 74 72 65 65 |e. ....|\endtree|
|00000e60| 0a 5c 65 6e 64 76 62 0a | 3c 2f 70 3e 0a 3c 70 3e |.\endvb.|</p>.<p>|
|00000e70| 49 74 20 74 75 72 6e 73 | 20 6f 75 74 20 74 68 61 |It turns| out tha|
|00000e80| 74 20 5c 54 65 58 26 72 | 73 71 75 6f 3b 73 20 61 |t \TeX&r|squo;s a|
|00000e90| 6c 69 67 6e 6d 65 6e 74 | 20 70 72 69 6d 69 74 69 |lignment| primiti|
|00000ea0| 76 65 73 20 61 72 65 20 | 6e 6f 74 20 76 65 72 79 |ves are |not very|
|00000eb0| 20 77 65 6c 6c 20 73 75 | 69 74 65 64 20 74 6f 0a | well su|ited to.|
|00000ec0| 61 75 74 6f 6d 61 74 69 | 63 20 67 65 6e 65 72 61 |automati|c genera|
|00000ed0| 74 69 6f 6e 20 6f 66 20 | 74 72 65 65 73 2e 20 20 |tion of |trees. |
|00000ee0| 54 68 65 20 6c 65 66 74 | 20 65 64 67 65 73 20 6f |The left| edges o|
|00000ef0| 66 20 74 68 65 20 74 72 | 65 65 73 20 61 74 20 65 |f the tr|ees at e|
|00000f00| 61 63 68 0a 6c 65 76 65 | 6c 20 63 61 6e 20 65 61 |ach.leve|l can ea|
|00000f10| 73 69 6c 79 20 62 65 20 | 6d 61 64 65 20 74 6f 20 |sily be |made to |
|00000f20| 6c 69 6e 65 20 75 70 2c | 20 62 75 74 20 69 74 20 |line up,| but it |
|00000f30| 69 73 20 64 69 66 66 69 | 63 75 6c 74 20 74 6f 20 |is diffi|cult to |
|00000f40| 63 65 6e 74 65 72 0a 6c | 69 6e 65 73 20 6f 66 20 |center.l|ines of |
|00000f50| 74 65 78 74 20 66 6f 72 | 20 74 68 65 20 72 6f 6f |text for| the roo|
|00000f60| 74 20 6f 66 20 61 20 74 | 72 65 65 20 69 6e 20 76 |t of a t|ree in v|
|00000f70| 65 72 74 69 63 61 6c 20 | 72 65 6c 61 74 69 6f 6e |ertical |relation|
|00000f80| 20 74 6f 20 69 74 73 20 | 73 75 62 74 72 65 65 73 | to its |subtrees|
|00000f90| 2e 0a 49 6e 73 74 65 61 | 64 2c 20 74 68 65 20 6d |..Instea|d, the m|
|00000fa0| 61 63 72 6f 73 20 64 65 | 73 63 72 69 62 65 64 20 |acros de|scribed |
|00000fb0| 68 65 72 65 20 63 6f 6e | 73 74 72 75 63 74 20 74 |here con|struct t|
|00000fc0| 72 65 65 73 20 66 72 6f | 6d 20 62 6f 78 65 73 20 |rees fro|m boxes |
|00000fd0| 61 6e 64 0a 67 6c 75 65 | 2c 20 64 6f 69 6e 67 20 |and.glue|, doing |
|00000fe0| 74 68 65 20 61 6c 69 67 | 6e 6d 65 6e 74 20 74 68 |the alig|nment th|
|00000ff0| 65 6d 73 65 6c 76 65 73 | 2e 20 20 54 68 69 73 20 |emselves|. This |
|00001000| 69 73 20 6e 6f 74 20 71 | 75 69 74 65 20 61 73 20 |is not q|uite as |
|00001010| 73 69 6d 70 6c 65 20 61 | 73 0a 69 74 20 73 6f 75 |simple a|s.it sou|
|00001020| 6e 64 73 26 6d 64 61 73 | 68 3b 69 74 20 77 6f 75 |nds&mdas|h;it wou|
|00001030| 6c 64 20 62 65 20 69 6e | 63 6f 72 72 65 63 74 20 |ld be in|correct |
|00001040| 74 6f 20 73 65 74 20 73 | 75 62 74 72 65 65 73 20 |to set s|ubtrees |
|00001050| 69 6e 64 65 70 65 6e 64 | 65 6e 74 6c 79 20 6f 66 |independ|ently of|
|00001060| 0a 65 61 63 68 20 6f 74 | 68 65 72 2c 20 62 65 63 |.each ot|her, bec|
|00001070| 61 75 73 65 20 74 68 65 | 6e 20 74 68 65 20 65 64 |ause the|n the ed|
|00001080| 67 65 73 20 77 6f 75 6c | 64 20 6e 6f 74 20 6c 69 |ges woul|d not li|
|00001090| 6e 65 20 75 70 2e 20 20 | 46 6f 72 20 69 6e 73 74 |ne up. |For inst|
|000010a0| 61 6e 63 65 2c 0a 69 6e | 20 74 68 65 20 74 61 78 |ance,.in| the tax|
|000010b0| 6f 6e 6f 6d 79 20 61 62 | 6f 76 65 2c 20 74 68 65 |onomy ab|ove, the|
|000010c0| 20 74 65 78 74 20 26 6c | 64 71 75 6f 3b 53 65 61 | text &l|dquo;Sea|
|000010d0| 72 63 68 20 54 72 65 65 | 26 72 64 71 75 6f 3b 20 |rch Tree|&rdquo; |
|000010e0| 73 68 6f 75 6c 64 20 6c | 69 6e 65 20 75 70 0a 77 |should l|ine up.w|
|000010f0| 69 74 68 20 26 6c 64 71 | 75 6f 3b 50 61 72 73 65 |ith &ldq|uo;Parse|
|00001100| 20 54 72 65 65 26 72 64 | 71 75 6f 3b 2e 20 20 41 | Tree&rd|quo;. A|
|00001110| 20 6f 6e 65 2d 70 61 73 | 73 20 61 6c 67 6f 72 69 | one-pas|s algori|
|00001120| 74 68 6d 20 77 6f 75 6c | 64 20 73 65 74 20 74 68 |thm woul|d set th|
|00001130| 65 20 66 6f 72 6d 65 72 | 0a 73 6f 6d 65 77 68 61 |e former|.somewha|
|00001140| 74 20 74 6f 20 74 68 65 | 20 72 69 67 68 74 20 6f |t to the| right o|
|00001150| 66 20 74 68 65 20 6c 61 | 74 74 65 72 2e 0a 3c 2f |f the la|tter..</|
|00001160| 70 3e 0a 3c 70 3e 54 6f | 20 73 6f 6c 76 65 20 74 |p>.<p>To| solve t|
|00001170| 68 69 73 20 70 72 6f 62 | 6c 65 6d 2c 20 74 68 65 |his prob|lem, the|
|00001180| 20 6d 61 63 72 6f 73 20 | 64 65 73 63 72 69 62 65 | macros |describe|
|00001190| 64 20 68 65 72 65 20 73 | 65 74 20 61 20 74 72 65 |d here s|et a tre|
|000011a0| 65 20 75 73 69 6e 67 0a | 74 68 72 65 65 20 70 61 |e using.|three pa|
|000011b0| 73 73 65 73 2e 20 20 46 | 69 72 73 74 2c 20 61 20 |sses. F|irst, a |
|000011c0| 64 61 74 61 20 73 74 72 | 75 63 74 75 72 65 20 69 |data str|ucture i|
|000011d0| 73 20 62 75 69 6c 74 20 | 75 70 20 66 72 6f 6d 20 |s built |up from |
|000011e0| 74 68 65 20 74 72 65 65 | 0a 64 65 66 69 6e 69 74 |the tree|.definit|
|000011f0| 69 6f 6e 2e 20 20 53 65 | 63 6f 6e 64 2c 20 74 68 |ion. Se|cond, th|
|00001200| 61 74 20 64 61 74 61 20 | 73 74 72 75 63 74 75 72 |at data |structur|
|00001210| 65 20 69 73 20 75 73 65 | 64 20 74 6f 20 63 61 6c |e is use|d to cal|
|00001220| 63 75 6c 61 74 65 20 74 | 68 65 0a 77 69 64 74 68 |culate t|he.width|
|00001230| 20 6f 66 20 65 61 63 68 | 20 6c 65 76 65 6c 20 6f | of each| level o|
|00001240| 66 20 74 68 65 20 74 72 | 65 65 2c 20 73 6f 20 74 |f the tr|ee, so t|
|00001250| 68 61 74 20 74 68 65 20 | 73 75 62 74 72 65 65 73 |hat the |subtrees|
|00001260| 20 63 61 6e 20 62 65 20 | 61 6c 69 67 6e 65 64 20 | can be |aligned |
|00001270| 77 69 74 68 20 65 61 63 | 68 0a 6f 74 68 65 72 2e |with eac|h.other.|
|00001280| 20 20 46 69 6e 61 6c 6c | 79 2c 20 74 68 65 20 64 | Finall|y, the d|
|00001290| 61 74 61 20 73 74 72 75 | 63 74 75 72 65 20 61 6e |ata stru|cture an|
|000012a0| 64 20 74 68 65 20 63 61 | 6c 63 75 6c 61 74 65 64 |d the ca|lculated|
|000012b0| 20 6c 69 73 74 20 6f 66 | 20 77 69 64 74 68 73 0a | list of| widths.|
|000012c0| 61 72 65 20 75 73 65 64 | 20 74 6f 20 73 65 74 20 |are used| to set |
|000012d0| 74 68 65 20 73 79 73 74 | 65 6d 20 6f 66 20 62 6f |the syst|em of bo|
|000012e0| 78 65 73 2c 20 67 6c 75 | 65 2c 20 61 6e 64 20 72 |xes, glu|e, and r|
|000012f0| 75 6c 65 73 20 74 68 61 | 74 20 6d 61 6b 65 20 75 |ules tha|t make u|
|00001300| 70 20 74 68 65 20 74 72 | 65 65 2e 0a 3c 2f 70 3e |p the tr|ee..</p>|
|00001310| 0c 0a 3c 70 3e 5c 62 65 | 67 69 6e 73 65 63 74 69 |..<p>\be|ginsecti|
|00001320| 6f 6e 20 50 61 73 73 20 | 31 3a 20 49 6e 74 65 72 |on Pass |1: Inter|
|00001330| 6e 61 6c 20 73 74 6f 72 | 61 67 65 20 6f 66 20 74 |nal stor|age of t|
|00001340| 68 65 20 74 72 65 65 20 | 73 74 72 75 63 74 75 72 |he tree |structur|
|00001350| 65 0a 3c 2f 70 3e 0a 3c | 70 3e 54 68 65 72 65 20 |e.</p>.<|p>There |
|00001360| 61 72 65 20 73 65 76 65 | 72 61 6c 20 70 6f 73 73 |are seve|ral poss|
|00001370| 69 62 6c 65 20 77 61 79 | 73 20 74 6f 20 73 74 6f |ible way|s to sto|
|00001380| 72 65 20 74 68 65 20 73 | 74 72 75 63 74 75 72 65 |re the s|tructure|
|00001390| 20 64 65 66 69 6e 65 64 | 20 62 79 20 74 68 65 0a | defined| by the.|
|000013a0| 74 72 65 65 20 6d 61 63 | 72 6f 73 2e 20 20 53 69 |tree mac|ros. Si|
|000013b0| 6e 63 65 20 77 65 20 77 | 61 6e 74 20 74 6f 20 72 |nce we w|ant to r|
|000013c0| 65 6d 65 6d 62 65 72 20 | 61 6c 72 65 61 64 79 2d |emember |already-|
|000013d0| 73 65 74 20 74 65 78 74 | 20 28 74 68 65 20 77 6f |set text| (the wo|
|000013e0| 72 64 73 20 61 74 0a 74 | 68 65 20 72 6f 6f 74 73 |rds at.t|he roots|
|000013f0| 20 6f 66 20 65 61 63 68 | 20 74 72 65 65 20 6f 66 | of each| tree of|
|00001400| 20 73 75 62 74 72 65 65 | 29 20 77 65 20 77 69 6c | subtree|) we wil|
|00001410| 6c 20 75 73 65 20 61 20 | 6e 65 73 74 65 64 20 73 |l use a |nested s|
|00001420| 74 72 75 63 74 75 72 65 | 20 6f 66 20 62 6f 78 65 |tructure| of boxe|
|00001430| 73 2e 0a 45 61 63 68 20 | 73 75 62 74 72 65 65 20 |s..Each |subtree |
|00001440| 69 73 20 73 74 6f 72 65 | 64 20 69 6e 20 61 6e 20 |is store|d in an |
|00001450| 2a 5c 68 62 6f 78 2a 2c | 20 73 6f 20 74 68 61 74 |*\hbox*,| so that|
|00001460| 20 70 69 65 63 65 73 20 | 6f 66 20 69 74 20 63 61 | pieces |of it ca|
|00001470| 6e 20 62 65 20 70 75 6c | 6c 65 64 0a 6f 66 66 20 |n be pul|led.off |
|00001480| 65 61 73 69 6c 79 20 75 | 73 69 6e 67 20 2a 5c 6c |easily u|sing *\l|
|00001490| 61 73 74 62 6f 78 2a 20 | 61 6e 64 20 2a 5c 75 6e |astbox* |and *\un|
|000014a0| 73 6b 69 70 2a 2e 20 20 | 54 6f 20 64 69 73 74 69 |skip*. |To disti|
|000014b0| 6e 67 75 69 73 68 20 69 | 74 20 66 72 6f 6d 0a 61 |nguish i|t from.a|
|000014c0| 6e 6f 74 68 65 72 20 73 | 75 62 74 72 65 65 2c 20 |nother s|ubtree, |
|000014d0| 74 68 65 20 74 65 78 74 | 20 61 74 20 74 68 65 20 |the text| at the |
|000014e0| 72 6f 6f 74 20 6f 66 20 | 61 20 73 75 62 74 72 65 |root of |a subtre|
|000014f0| 65 20 69 73 20 73 74 6f | 72 65 64 20 69 6e 20 61 |e is sto|red in a|
|00001500| 20 2a 5c 76 62 6f 78 2a | 2e 0a 54 6f 20 6d 61 6b | *\vbox*|..To mak|
|00001510| 65 20 74 68 69 73 20 63 | 6c 65 61 72 65 72 2c 20 |e this c|learer, |
|00001520| 6c 65 74 20 75 73 20 72 | 65 74 75 72 6e 20 74 6f |let us r|eturn to|
|00001530| 20 6f 75 72 20 6f 72 69 | 67 69 6e 61 6c 20 74 61 | our ori|ginal ta|
|00001540| 78 6f 6e 6f 6d 79 2e 0a | 57 65 20 73 68 61 6c 6c |xonomy..|We shall|
|00001550| 20 69 67 6e 6f 72 65 20 | 66 6f 72 20 74 68 65 20 | ignore |for the |
|00001560| 6d 6f 6d 65 6e 74 0a 74 | 68 65 20 64 65 74 61 69 |moment.t|he detai|
|00001570| 6c 73 20 69 6e 73 69 64 | 65 20 74 68 65 20 74 65 |ls insid|e the te|
|00001580| 78 74 20 2a 5c 76 62 6f | 78 2a 65 73 2c 20 61 6e |xt *\vbo|x*es, an|
|00001590| 64 20 74 68 65 20 67 6c | 75 65 20 62 65 74 77 65 |d the gl|ue betwe|
|000015a0| 65 6e 20 62 6f 78 65 73 | 2e 0a 41 66 74 65 72 20 |en boxes|..After |
|000015b0| 74 68 65 20 66 69 72 73 | 74 20 70 61 73 73 2c 20 |the firs|t pass, |
|000015c0| 74 68 65 20 74 72 65 65 | 20 61 73 20 61 20 77 68 |the tree| as a wh|
|000015d0| 6f 6c 65 20 77 6f 75 6c | 64 20 6c 6f 6f 6b 20 6c |ole woul|d look l|
|000015e0| 69 6b 65 20 74 68 65 0a | 66 6f 6c 6c 6f 77 69 6e |ike the.|followin|
|000015f0| 67 20 73 65 74 20 6f 66 | 20 62 6f 78 65 73 3a 0a |g set of| boxes:.|
|00001600| 3c 2f 70 3e 0a 3c 70 3e | 5c 76 62 0a 5c 68 62 6f |</p>.<p>|\vb.\hbo|
|00001610| 78 7b 5c 76 62 6f 78 7b | 54 72 65 65 20 55 73 65 |x{\vbox{|Tree Use|
|00001620| 73 0a 20 20 5c 68 62 6f | 78 7b 5c 76 62 6f 78 7b |s. \hbo|x{\vbox{|
|00001630| 43 6f 6d 70 75 74 65 72 | 20 53 63 69 65 6e 63 65 |Computer| Science|
|00001640| 0a 20 20 20 20 5c 68 62 | 6f 78 7b 5c 76 62 6f 78 |. \hb|ox{\vbox|
|00001650| 7b 44 61 74 61 20 53 74 | 72 75 63 74 75 72 65 73 |{Data St|ructures|
|00001660| 0a 20 20 20 20 20 20 5c | 68 62 6f 78 7b 5c 76 62 |. \|hbox{\vb|
|00001670| 6f 78 7b 53 65 61 72 63 | 68 20 54 72 65 65 0a 20 |ox{Searc|h Tree. |
|00001680| 20 20 20 20 20 5c 68 62 | 6f 78 7b 5c 76 62 6f 78 | \hb|ox{\vbox|
|00001690| 7b 50 72 69 6f 72 69 74 | 79 20 51 75 65 75 65 0a |{Priorit|y Queue.|
|000016a0| 20 20 20 20 2e 2e 2e 0a | 20 20 2e 2e 2e 0a 5c 65 | ....| ....\e|
|000016b0| 6e 64 76 62 0a 3c 2f 70 | 3e 0a 3c 70 3e 4e 6f 77 |ndvb.</p|>.<p>Now|
|000016c0| 20 77 65 20 63 61 6e 20 | 62 65 67 69 6e 20 64 65 | we can |begin de|
|000016d0| 66 69 6e 69 6e 67 20 74 | 68 65 20 74 72 65 65 20 |fining t|he tree |
|000016e0| 6d 61 63 72 6f 73 2e 20 | 20 57 65 20 73 74 61 72 |macros. | We star|
|000016f0| 74 20 64 65 66 69 6e 69 | 6e 67 20 61 20 74 72 65 |t defini|ng a tre|
|00001700| 65 0a 77 69 74 68 20 74 | 68 65 20 2a 5c 74 72 65 |e.with t|he *\tre|
|00001710| 65 2a 20 6d 61 63 72 6f | 3b 20 74 68 69 73 20 6d |e* macro|; this m|
|00001720| 65 72 65 6c 79 20 73 65 | 74 73 20 75 70 20 74 68 |erely se|ts up th|
|00001730| 65 20 61 73 73 69 67 6e | 6d 65 6e 74 20 6f 66 20 |e assign|ment of |
|00001740| 74 68 65 0a 62 6f 78 65 | 64 20 74 72 65 65 20 73 |the.boxe|d tree s|
|00001750| 74 72 75 63 74 75 72 65 | 20 69 6e 74 6f 20 61 20 |tructure| into a |
|00001760| 62 6f 78 20 63 61 6c 6c | 65 64 20 2a 5c 74 72 65 |box call|ed *\tre|
|00001770| 65 62 6f 78 2a 2e 20 20 | 53 74 61 72 74 69 6e 67 |ebox*. |Starting|
|00001780| 20 61 20 73 75 62 74 72 | 65 65 0a 69 73 20 73 69 | a subtr|ee.is si|
|00001790| 6d 69 6c 61 72 2c 20 62 | 75 74 20 74 68 65 72 65 |milar, b|ut there|
|000017a0| 20 69 73 20 6e 6f 20 61 | 73 73 69 67 6e 6d 65 6e | is no a|ssignmen|
|000017b0| 74 3b 20 61 6c 73 6f 2c | 20 69 66 20 69 74 20 69 |t; also,| if it i|
|000017c0| 73 20 74 68 65 20 66 69 | 72 73 74 0a 2a 5c 73 75 |s the fi|rst.*\su|
|000017d0| 62 74 72 65 65 2a 20 6f | 66 20 69 74 73 20 74 72 |btree* o|f its tr|
|000017e0| 65 65 20 6f 72 20 73 75 | 62 74 72 65 65 2c 20 77 |ee or su|btree, w|
|000017f0| 65 20 6d 75 73 74 20 73 | 74 6f 70 20 6d 61 6b 69 |e must s|top maki|
|00001800| 6e 67 20 74 68 65 20 2a | 5c 76 62 6f 78 2a 0a 63 |ng the *|\vbox*.c|
|00001810| 6f 6e 74 61 69 6e 69 6e | 67 20 74 68 65 20 72 6f |ontainin|g the ro|
|00001820| 6f 74 20 74 65 78 74 2e | 20 20 41 20 6c 65 61 66 |ot text.| A leaf|
|00001830| 20 69 73 20 6d 65 72 65 | 6c 79 20 61 20 73 75 62 | is mere|ly a sub|
|00001840| 74 72 65 65 20 77 69 74 | 68 6f 75 74 20 61 6e 79 |tree wit|hout any|
|00001850| 0a 73 75 62 2d 73 75 62 | 74 72 65 65 73 2e 0a 3c |.sub-sub|trees..<|
|00001860| 2f 70 3e 0a 3c 70 3e 5c | 76 62 0a 5c 6e 65 77 62 |/p>.<p>\|vb.\newb|
|00001870| 6f 78 5c 74 72 65 65 62 | 6f 78 0a 5c 64 65 66 5c |ox\treeb|ox.\def\|
|00001880| 74 72 65 65 7b 5c 67 6c | 6f 62 61 6c 5c 73 65 74 |tree{\gl|obal\set|
|00001890| 62 6f 78 5c 74 72 65 65 | 62 6f 78 3d 5c 62 6f 78 |box\tree|box=\box|
|000018a0| 74 72 65 65 0a 5c 64 65 | 66 5c 73 75 62 74 72 65 |tree.\de|f\subtre|
|000018b0| 65 7b 5c 65 74 74 65 78 | 74 20 5c 62 6f 78 74 72 |e{\ettex|t \boxtr|
|000018c0| 65 65 0a 5c 64 65 66 5c | 6c 65 61 66 23 31 7b 5c |ee.\def\|leaf#1{\|
|000018d0| 73 75 62 74 72 65 65 23 | 31 5c 65 6e 64 73 75 62 |subtree#|1\endsub|
|000018e0| 74 72 65 65 0a 5c 65 6e | 64 76 62 0a 3c 2f 70 3e |tree.\en|dvb.</p>|
|000018f0| 0a 3c 70 3e 46 69 6e 69 | 73 68 69 6e 67 20 61 20 |.<p>Fini|shing a |
|00001900| 73 75 62 74 72 65 65 20 | 6d 65 72 65 6c 79 20 69 |subtree |merely i|
|00001910| 6e 76 6f 6c 76 65 73 20 | 66 69 72 73 74 20 6d 61 |nvolves |first ma|
|00001920| 6b 69 6e 67 20 73 75 72 | 65 20 74 68 65 20 72 6f |king sur|e the ro|
|00001930| 6f 74 20 74 65 78 74 20 | 69 73 0a 63 6f 6d 70 6c |ot text |is.compl|
|00001940| 65 74 65 2c 20 61 6e 64 | 20 73 65 63 6f 6e 64 0a |ete, and| second.|
|00001950| 63 6f 6d 70 6c 65 74 69 | 6e 67 20 74 68 65 20 62 |completi|ng the b|
|00001960| 6f 78 20 74 68 61 74 20 | 77 61 73 20 73 74 61 72 |ox that |was star|
|00001970| 74 65 64 20 69 6e 20 74 | 68 65 20 65 78 70 61 6e |ted in t|he expan|
|00001980| 73 69 6f 6e 20 6f 66 20 | 2a 5c 73 75 62 74 72 65 |sion of |*\subtre|
|00001990| 65 2a 2e 0a 46 69 6e 69 | 73 68 69 6e 67 20 61 20 |e*..Fini|shing a |
|000019a0| 77 68 6f 6c 65 20 74 72 | 65 65 20 69 6e 76 6f 6c |whole tr|ee invol|
|000019b0| 76 65 73 20 62 6f 74 68 | 20 6f 66 20 74 68 6f 73 |ves both| of thos|
|000019c0| 65 20 73 74 65 70 73 2c | 20 62 75 74 20 74 68 65 |e steps,| but the|
|000019d0| 6e 20 61 66 74 65 72 20 | 74 68 65 0a 62 6f 78 20 |n after |the.box |
|000019e0| 69 73 20 63 6f 6d 70 6c | 65 74 65 64 20 74 68 65 |is compl|eted the|
|000019f0| 20 72 65 6d 61 69 6e 69 | 6e 67 20 74 77 6f 20 70 | remaini|ng two p|
|00001a00| 61 73 73 65 73 20 6d 75 | 73 74 20 62 65 20 72 75 |asses mu|st be ru|
|00001a10| 6e 2e 0a 3c 2f 70 3e 0a | 3c 70 3e 5c 76 62 0a 5c |n..</p>.|<p>\vb.\|
|00001a20| 64 65 66 5c 65 6e 64 73 | 75 62 74 72 65 65 7b 5c |def\ends|ubtree{\|
|00001a30| 65 74 74 65 78 74 20 5c | 65 67 72 6f 75 70 0a 5c |ettext \|egroup.\|
|00001a40| 64 65 66 5c 65 6e 64 74 | 72 65 65 7b 5c 65 6e 64 |def\endt|ree{\end|
|00001a50| 73 75 62 74 72 65 65 20 | 5c 73 65 74 74 72 65 65 |subtree |\settree|
|00001a60| 73 69 7a 65 73 20 5c 74 | 79 70 65 73 65 74 74 72 |sizes \t|ypesettr|
|00001a70| 65 65 0a 5c 65 6e 64 76 | 62 0a 3c 2f 70 3e 0a 0a |ee.\endv|b.</p>..|
|00001a80| 3c 70 3e 4e 6f 77 20 61 | 6c 6c 20 74 68 61 74 20 |<p>Now a|ll that |
|00001a90| 72 65 6d 61 69 6e 73 20 | 74 6f 20 62 65 20 64 65 |remains |to be de|
|00001aa0| 66 69 6e 65 64 20 6f 66 | 20 74 68 65 20 66 69 72 |fined of| the fir|
|00001ab0| 73 74 20 70 61 73 73 20 | 69 73 20 74 68 65 20 63 |st pass |is the c|
|00001ac0| 6f 6e 73 74 72 75 63 74 | 69 6f 6e 0a 6f 66 20 74 |onstruct|ion.of t|
|00001ad0| 68 65 20 2a 5c 76 62 6f | 78 2a 20 63 6f 6e 74 61 |he *\vbo|x* conta|
|00001ae0| 69 6e 69 6e 67 20 74 68 | 65 20 72 6f 6f 74 20 74 |ining th|e root t|
|00001af0| 65 78 74 2e 20 20 54 68 | 65 20 64 69 66 66 69 63 |ext. Th|e diffic|
|00001b00| 75 6c 74 79 20 68 65 72 | 65 20 69 73 0a 63 6f 6e |ulty her|e is.con|
|00001b10| 76 69 6e 63 69 6e 67 20 | 5c 54 65 58 5c 20 74 6f |vincing |\TeX\ to|
|00001b20| 20 6d 61 6b 65 20 74 68 | 65 20 2a 5c 76 62 6f 78 | make th|e *\vbox|
|00001b30| 2a 20 6f 6e 6c 79 20 61 | 73 20 77 69 64 65 20 61 |* only a|s wide a|
|00001b40| 73 20 74 68 65 20 77 69 | 64 65 73 74 20 6c 69 6e |s the wi|dest lin|
|00001b50| 65 0a 6f 66 20 74 65 78 | 74 2c 20 72 61 74 68 65 |e.of tex|t, rathe|
|00001b60| 72 20 74 68 61 6e 20 74 | 68 65 20 77 69 64 74 68 |r than t|he width|
|00001b70| 20 6f 66 20 74 68 65 20 | 65 6e 74 69 72 65 20 70 | of the |entire p|
|00001b80| 61 67 65 2e 20 20 4f 6e | 65 20 73 6f 6c 75 74 69 |age. On|e soluti|
|00001b90| 6f 6e 20 69 73 20 74 6f | 0a 70 75 74 20 74 68 65 |on is to|.put the|
|00001ba0| 20 74 65 78 74 20 69 6e | 20 61 6e 20 2a 5c 68 61 | text in| an *\ha|
|00001bb0| 6c 69 67 6e 2a 2c 20 77 | 69 74 68 20 2a 5c 63 72 |lign*, w|ith *\cr|
|00001bc0| 63 72 2a 20 69 6d 70 6c | 69 63 69 74 20 61 74 20 |cr* impl|icit at |
|00001bd0| 74 68 65 20 65 6e 64 20 | 6f 66 20 65 61 63 68 20 |the end |of each |
|00001be0| 6c 69 6e 65 2e 0a 54 68 | 65 20 2a 5c 69 66 74 72 |line..Th|e *\iftr|
|00001bf0| 65 65 74 65 78 74 2a 20 | 74 65 73 74 20 69 73 20 |eetext* |test is |
|00001c00| 75 73 65 64 20 74 6f 20 | 74 65 6c 6c 20 77 68 65 |used to |tell whe|
|00001c10| 74 68 65 72 20 77 65 20 | 61 72 65 20 73 74 69 6c |ther we |are stil|
|00001c20| 6c 20 69 6e 73 69 64 65 | 20 74 68 65 0a 2a 5c 68 |l inside| the.*\h|
|00001c30| 61 6c 69 67 6e 2a 20 61 | 6e 64 20 2a 5c 76 62 6f |align* a|nd *\vbo|
|00001c40| 78 2a 2c 20 73 6f 20 74 | 68 61 74 20 2a 5c 65 74 |x*, so t|hat *\et|
|00001c50| 74 65 78 74 2a 20 63 61 | 6e 20 74 65 6c 6c 20 77 |text* ca|n tell w|
|00001c60| 68 65 74 68 65 72 20 69 | 74 20 73 68 6f 75 6c 64 |hether i|t should|
|00001c70| 20 64 6f 0a 61 6e 79 74 | 68 69 6e 67 2e 20 20 49 | do.anyt|hing. I|
|00001c80| 74 20 69 73 20 67 6c 6f | 62 61 6c 6c 79 20 66 61 |t is glo|bally fa|
|00001c90| 6c 73 65 2c 20 62 75 74 | 20 77 69 74 68 69 6e 20 |lse, but| within |
|00001ca0| 74 68 65 20 2a 5c 76 62 | 6f 78 2a 20 69 74 20 67 |the *\vb|ox* it g|
|00001cb0| 65 74 73 20 73 65 74 20 | 74 6f 20 74 72 75 65 2e |ets set |to true.|
|00001cc0| 0a 3c 2f 70 3e 0a 3c 70 | 3e 5c 76 62 0a 5c 6e 65 |.</p>.<p|>\vb.\ne|
|00001cd0| 77 69 66 5c 69 66 74 72 | 65 65 74 65 78 74 5c 74 |wif\iftr|eetext\t|
|00001ce0| 72 65 65 74 65 78 74 66 | 61 6c 73 65 20 20 20 20 |reetextf|alse |
|00001cf0| 20 20 20 20 20 25 20 57 | 68 65 74 68 65 72 20 73 | % W|hether s|
|00001d00| 74 69 6c 6c 20 61 6c 69 | 67 6e 69 6e 67 20 74 65 |till ali|gning te|
|00001d10| 78 74 0a 5c 64 65 66 5c | 62 6f 78 74 72 65 65 7b |xt.\def\|boxtree{|
|00001d20| 5c 68 62 6f 78 5c 62 67 | 72 6f 75 70 20 20 20 20 |\hbox\bg|roup |
|00001d30| 20 20 20 20 20 20 20 20 | 20 20 20 25 20 53 74 61 | | % Sta|
|00001d40| 72 74 20 6f 75 74 65 72 | 20 62 6f 78 20 6f 66 20 |rt outer| box of |
|00001d50| 74 72 65 65 20 6f 72 20 | 73 75 62 74 72 65 65 0a |tree or |subtree.|
|00001d60| 20 20 5c 62 61 73 65 6c | 69 6e 65 73 6b 69 70 20 | \basel|ineskip |
|00001d70| 32 2e 35 65 78 20 20 20 | 20 20 20 20 20 20 20 20 |2.5ex | |
|00001d80| 20 20 20 20 20 20 20 20 | 25 20 4e 61 72 72 6f 77 | |% Narrow|
|00001d90| 20 6c 69 6e 65 20 73 70 | 61 63 69 6e 67 20 73 6c | line sp|acing sl|
|00001da0| 69 67 68 74 6c 79 0a 20 | 20 5c 74 61 62 73 6b 69 |ightly. | \tabski|
|00001db0| 70 20 30 70 74 20 20 20 | 20 20 20 20 20 20 20 20 |p 0pt | |
|00001dc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 25 | | %|
|00001dd0| 20 4e 6f 20 73 70 75 72 | 69 6f 75 73 20 67 6c 75 | No spur|ious glu|
|00001de0| 65 20 69 6e 20 61 6c 69 | 67 6e 6d 65 6e 74 0a 20 |e in ali|gnment. |
|00001df0| 20 5c 76 62 6f 78 5c 62 | 67 72 6f 75 70 20 20 20 | \vbox\b|group |
|00001e00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001e10| 20 20 20 20 20 20 20 25 | 20 53 74 61 72 74 20 69 | %| Start i|
|00001e20| 6e 6e 65 72 20 74 65 78 | 74 20 5c 76 62 6f 78 0a |nner tex|t \vbox.|
|00001e30| 20 20 5c 74 72 65 65 74 | 65 78 74 74 72 75 65 20 | \treet|exttrue |
|00001e40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001e50| 20 20 20 20 20 20 20 20 | 25 20 52 65 6d 65 6d 62 | |% Rememb|
|00001e60| 65 72 20 66 6f 72 20 5c | 65 74 74 65 78 74 0a 20 |er for \|ettext. |
|00001e70| 20 5c 6c 65 74 5c 70 61 | 72 5c 63 72 63 72 20 5c | \let\pa|r\crcr \|
|00001e80| 6f 62 65 79 6c 69 6e 65 | 73 20 20 20 20 20 20 20 |obeyline|s |
|00001e90| 20 20 20 20 20 20 20 25 | 20 4e 65 77 20 6c 69 6e | %| New lin|
|00001ea0| 65 20 62 72 65 61 6b 73 | 20 77 69 74 68 6f 75 74 |e breaks| without|
|00001eb0| 20 65 78 70 6c 69 63 69 | 74 20 5c 63 72 0a 20 20 | explici|t \cr. |
|00001ec0| 5c 68 61 6c 69 67 6e 5c | 62 67 72 6f 75 70 23 23 |\halign\|bgroup##|
|00001ed0| 5c 68 66 69 6c 5c 63 72 | 20 20 20 20 20 20 20 20 |\hfil\cr| |
|00001ee0| 20 20 20 20 20 25 20 53 | 74 61 72 74 20 61 6c 69 | % S|tart ali|
|00001ef0| 67 6e 6d 65 6e 74 20 77 | 69 74 68 20 73 69 6d 70 |gnment w|ith simp|
|00001f00| 6c 65 20 74 65 6d 70 6c | 61 74 65 0a 5c 64 65 66 |le templ|ate.\def|
|00001f10| 5c 65 74 74 65 78 74 7b | 5c 69 66 74 72 65 65 74 |\ettext{|\iftreet|
|00001f20| 65 78 74 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ext | |
|00001f30| 20 20 20 20 25 20 41 72 | 65 20 77 65 20 73 74 69 | % Ar|e we sti|
|00001f40| 6c 6c 20 69 6e 20 69 6e | 6e 65 72 20 74 65 78 74 |ll in in|ner text|
|00001f50| 20 5c 76 62 6f 78 3f 0a | 20 20 5c 63 72 63 72 5c | \vbox?.| \crcr\|
|00001f60| 65 67 72 6f 75 70 20 5c | 65 67 72 6f 75 70 20 5c |egroup \|egroup \|
|00001f70| 66 69 20 20 20 20 20 20 | 20 20 20 20 20 20 20 25 |fi | %|
|00001f80| 20 59 65 73 2c 20 65 6e | 64 20 61 6c 69 67 6e 6d | Yes, en|d alignm|
|00001f90| 65 6e 74 20 61 6e 64 20 | 62 6f 78 0a 5c 65 6e 64 |ent and |box.\end|
|00001fa0| 76 62 0a 3c 2f 70 3e 0c | 0a 3c 70 3e 5c 62 65 67 |vb.</p>.|.<p>\beg|
|00001fb0| 69 6e 73 65 63 74 69 6f | 6e 20 50 61 73 73 20 32 |insectio|n Pass 2|
|00001fc0| 3a 20 43 61 6c 63 75 6c | 61 74 69 6f 6e 20 6f 66 |: Calcul|ation of|
|00001fd0| 20 77 69 64 74 68 73 20 | 61 74 20 65 61 63 68 20 | widths |at each |
|00001fe0| 6c 65 76 65 6c 0a 3c 2f | 70 3e 0a 3c 70 3e 48 65 |level.</|p>.<p>He|
|00001ff0| 72 65 20 77 65 20 63 61 | 6c 63 75 6c 61 74 65 20 |re we ca|lculate |
|00002000| 61 20 6c 69 73 74 20 6f | 66 20 74 68 65 20 64 69 |a list o|f the di|
|00002010| 6d 65 6e 73 69 6f 6e 73 | 20 6f 66 20 65 61 63 68 |mensions| of each|
|00002020| 20 6c 65 76 65 6c 20 6f | 66 20 74 68 65 20 74 72 | level o|f the tr|
|00002030| 65 65 3b 0a 74 68 61 74 | 20 69 73 2c 20 74 68 65 |ee;.that| is, the|
|00002040| 20 77 69 64 74 68 73 20 | 6f 66 20 74 68 65 20 77 | widths |of the w|
|00002050| 69 64 65 73 74 20 2a 5c | 76 62 6f 78 2a 20 61 74 |idest *\|vbox* at|
|00002060| 20 65 61 63 68 20 6c 65 | 76 65 6c 2e 0a 54 6f 20 | each le|vel..To |
|00002070| 64 6f 20 74 68 69 73 2c | 20 77 65 20 6e 65 65 64 |do this,| we need|
|00002080| 20 74 6f 20 62 65 20 61 | 62 6c 65 20 74 6f 20 6d | to be a|ble to m|
|00002090| 61 69 6e 74 61 69 6e 20 | 6c 69 73 74 73 20 6f 66 |aintain |lists of|
|000020a0| 20 74 68 69 6e 67 73 2e | 20 20 53 69 6e 63 65 20 | things.| Since |
|000020b0| 74 68 65 73 65 0a 61 72 | 65 20 64 69 6d 65 6e 73 |these.ar|e dimens|
|000020c0| 69 6f 6e 73 20 72 61 74 | 68 65 72 20 74 68 61 6e |ions rat|her than|
|000020d0| 20 62 6f 78 65 73 20 6f | 66 20 74 65 78 74 20 69 | boxes o|f text i|
|000020e0| 74 20 77 69 6c 6c 20 62 | 65 20 6d 6f 73 74 20 63 |t will b|e most c|
|000020f0| 6f 6e 76 65 6e 69 65 6e | 74 20 74 6f 0a 75 73 65 |onvenien|t to.use|
|00002100| 20 6d 61 63 72 6f 73 20 | 6c 69 6b 65 20 74 68 65 | macros |like the|
|00002110| 20 6f 6e 65 73 20 67 69 | 76 65 6e 20 6f 6e 20 70 | ones gi|ven on p|
|00002120| 61 67 65 20 33 37 38 20 | 6f 66 20 74 68 65 20 5c |age 378 |of the \|
|00002130| 54 65 58 20 62 6f 6f 6b | 2e 20 20 48 6f 77 65 76 |TeX book|. Howev|
|00002140| 65 72 2c 0a 69 74 20 74 | 75 72 6e 73 20 6f 75 74 |er,.it t|urns out|
|00002150| 20 74 68 61 74 20 77 65 | 20 6e 65 65 64 20 74 6f | that we| need to|
|00002160| 20 73 65 74 20 6f 75 72 | 20 6c 69 73 74 73 20 62 | set our| lists b|
|00002170| 6f 74 68 20 6c 6f 63 61 | 6c 6c 79 20 74 6f 20 73 |oth loca|lly to s|
|00002180| 6f 6d 65 0a 67 72 6f 75 | 70 69 6e 67 20 61 6e 64 |ome.grou|ping and|
|00002190| 20 61 6c 73 6f 20 67 6c | 6f 62 61 6c 6c 79 2e 20 | also gl|obally. |
|000021a0| 20 54 68 65 72 65 66 6f | 72 65 2c 20 77 65 20 77 | Therefo|re, we w|
|000021b0| 69 6c 6c 20 75 73 65 20 | 61 20 73 74 72 69 70 70 |ill use |a stripp|
|000021c0| 65 64 20 64 6f 77 6e 0a | 76 65 72 73 69 6f 6e 20 |ed down.|version |
|000021d0| 6f 66 20 74 68 6f 73 65 | 20 6c 69 73 74 20 6d 61 |of those| list ma|
|000021e0| 63 72 6f 73 20 74 68 61 | 74 20 63 61 6e 20 68 61 |cros tha|t can ha|
|000021f0| 6e 64 6c 65 20 74 68 65 | 20 2a 5c 67 6c 6f 62 61 |ndle the| *\globa|
|00002200| 6c 2a 20 66 6c 61 67 2e | 0a 54 6f 20 69 6d 70 6c |l* flag.|.To impl|
|00002210| 65 6d 65 6e 74 20 74 68 | 69 73 20 66 65 61 74 75 |ement th|is featu|
|00002220| 72 65 2c 20 77 65 20 68 | 61 76 65 20 74 6f 20 6c |re, we h|ave to l|
|00002230| 6f 73 65 20 73 6f 6d 65 | 20 6f 74 68 65 72 73 3b |ose some| others;|
|00002240| 20 74 68 65 20 63 68 69 | 65 66 20 6c 6f 73 73 65 | the chi|ef losse|
|00002250| 73 0a 61 72 65 20 74 68 | 61 74 20 74 68 65 20 63 |s.are th|at the c|
|00002260| 6f 6e 74 65 6e 74 73 20 | 6f 66 20 74 68 65 20 6c |ontents |of the l|
|00002270| 69 73 74 73 20 77 69 6c | 6c 20 62 65 20 6d 61 63 |ists wil|l be mac|
|00002280| 72 6f 2d 65 78 70 61 6e | 64 65 64 20 62 79 20 76 |ro-expan|ded by v|
|00002290| 61 72 69 6f 75 73 20 6f | 66 0a 74 68 65 20 6c 69 |arious o|f.the li|
|000022a0| 73 74 20 6d 61 6e 69 70 | 75 6c 61 74 69 6f 6e 20 |st manip|ulation |
|000022b0| 6d 61 63 72 6f 73 2c 20 | 61 6e 64 20 74 68 61 74 |macros, |and that|
|000022c0| 20 77 65 20 63 61 6e 26 | 72 73 71 75 6f 3b 74 20 | we can&|rsquo;t |
|000022d0| 75 73 65 20 72 65 64 65 | 66 69 6e 69 74 69 6f 6e |use rede|finition|
|000022e0| 73 20 6f 66 20 2a 5c 5c | 2a 0a 74 6f 20 70 65 72 |s of *\\|*.to per|
|000022f0| 66 6f 72 6d 20 73 6f 6d | 65 20 6f 70 65 72 61 74 |form som|e operat|
|00002300| 69 6f 6e 20 6f 6e 20 74 | 68 65 20 77 68 6f 6c 65 |ion on t|he whole|
|00002310| 20 6c 69 73 74 2e 0a 3c | 2f 70 3e 0a 3c 70 3e 54 | list..<|/p>.<p>T|
|00002320| 6f 20 69 6e 69 74 69 61 | 6c 69 7a 65 20 61 20 63 |o initia|lize a c|
|00002330| 6f 6e 74 72 6f 6c 20 73 | 65 71 75 65 6e 63 65 20 |ontrol s|equence |
|00002340| 74 6f 20 74 68 65 20 65 | 6d 70 74 79 20 6c 69 73 |to the e|mpty lis|
|00002350| 74 2c 20 77 65 20 64 6f | 20 2a 5c 6c 65 74 5c 63 |t, we do| *\let\c|
|00002360| 73 6e 61 6d 65 5c 6e 69 | 6c 2a 2e 0a 54 68 65 6e |sname\ni|l*..Then|
|00002370| 20 74 6f 20 61 64 64 20 | 61 6e 20 65 6c 65 6d 65 | to add |an eleme|
|00002380| 6e 74 20 74 6f 20 74 68 | 65 20 73 74 61 72 74 20 |nt to th|e start |
|00002390| 6f 66 20 74 68 65 20 6c | 69 73 74 20 77 65 20 64 |of the l|ist we d|
|000023a0| 6f 20 2a 5c 63 6f 6e 73 | 7b 74 6f 6b 65 6e 73 5c |o *\cons|{tokens\|
|000023b0| 63 73 6e 61 6d 65 2a 2c | 0a 61 6e 64 20 74 6f 20 |csname*,|.and to |
|000023c0| 72 65 6d 6f 76 65 20 74 | 68 61 74 20 65 6c 65 6d |remove t|hat elem|
|000023d0| 65 6e 74 20 77 65 20 64 | 6f 20 2a 5c 63 64 72 5c |ent we d|o *\cdr\|
|000023e0| 63 73 6e 61 6d 65 2a 2e | 20 20 42 6f 74 68 20 2a |csname*.| Both *|
|000023f0| 5c 63 6f 6e 73 2a 20 61 | 6e 64 20 2a 5c 63 64 72 |\cons* a|nd *\cdr|
|00002400| 2a 0a 63 61 6e 20 62 65 | 20 70 72 65 66 69 78 65 |*.can be| prefixe|
|00002410| 64 20 77 69 74 68 20 2a | 5c 67 6c 6f 62 61 6c 2a |d with *|\global*|
|00002420| 2e 20 20 54 68 65 20 66 | 69 72 73 74 20 65 6c 65 |. The f|irst ele|
|00002430| 6d 65 6e 74 20 6f 6e 20 | 74 68 65 20 6c 69 73 74 |ment on |the list|
|00002440| 20 63 61 6e 20 62 65 0a | 65 78 70 61 6e 64 65 64 | can be.|expanded|
|00002450| 20 69 6e 74 6f 20 74 68 | 65 20 74 6f 6b 65 6e 20 | into th|e token |
|00002460| 73 74 72 65 61 6d 20 62 | 79 20 64 6f 69 6e 67 20 |stream b|y doing |
|00002470| 2a 5c 63 61 72 5c 63 73 | 6e 61 6d 65 2a 2e 20 20 |*\car\cs|name*. |
|00002480| 54 68 65 72 65 20 69 73 | 20 6e 6f 0a 65 72 72 6f |There is| no.erro|
|00002490| 72 20 63 68 65 63 6b 69 | 6e 67 2c 20 73 6f 20 67 |r checki|ng, so g|
|000024a0| 69 76 69 6e 67 20 2a 5c | 63 61 72 2a 20 6f 72 20 |iving *\|car* or |
|000024b0| 2a 5c 63 64 72 2a 20 74 | 68 65 20 65 6d 70 74 79 |*\cdr* t|he empty|
|000024c0| 20 6c 69 73 74 20 77 69 | 6c 6c 20 63 61 75 73 65 | list wi|ll cause|
|000024d0| 0a 6d 79 73 74 65 72 69 | 6f 75 73 20 65 72 72 6f |.mysteri|ous erro|
|000024e0| 72 73 20 6c 61 74 65 72 | 20 6f 6e 2e 20 20 42 65 |rs later| on. Be|
|000024f0| 63 61 75 73 65 20 6f 66 | 20 74 68 65 20 6d 61 63 |cause of| the mac|
|00002500| 72 6f 20 65 78 70 61 6e | 73 69 6f 6e 20 70 65 72 |ro expan|sion per|
|00002510| 66 6f 72 6d 65 64 0a 62 | 79 20 2a 5c 63 6f 6e 73 |formed.b|y *\cons|
|00002520| 2a 20 61 6e 64 20 2a 5c | 63 64 72 2a 2c 20 74 68 |* and *\|cdr*, th|
|00002530| 65 20 74 6f 6b 65 6e 20 | 75 73 65 64 20 74 6f 20 |e token |used to |
|00002540| 73 65 70 61 72 61 74 65 | 20 6c 69 73 74 20 65 6c |separate| list el|
|00002550| 65 6d 65 6e 74 73 0a 65 | 78 70 61 6e 64 73 20 74 |ements.e|xpands t|
|00002560| 6f 20 69 74 73 65 6c 66 | 2c 20 61 6e 64 20 75 6e |o itself|, and un|
|00002570| 6c 69 6b 65 20 74 68 65 | 20 5c 54 65 58 20 62 6f |like the| \TeX bo|
|00002580| 6f 6b 20 6d 61 63 72 6f | 73 20 63 61 6e 6e 6f 74 |ok macro|s cannot|
|00002590| 20 62 65 20 72 65 64 65 | 66 69 6e 65 64 0a 74 6f | be rede|fined.to|
|000025a0| 20 64 6f 20 61 6e 79 74 | 68 69 6e 67 20 75 73 65 | do anyt|hing use|
|000025b0| 66 75 6c 2e 0a 3c 2f 70 | 3e 0a 3c 70 3e 5c 76 62 |ful..</p|>.<p>\vb|
|000025c0| 0a 5c 64 65 66 5c 63 6f | 6e 73 23 31 23 32 7b 5c |.\def\co|ns#1#2{\|
|000025d0| 65 64 65 66 23 32 7b 5c | 78 6d 61 72 6b 20 23 31 |edef#2{\|xmark #1|
|000025e0| 23 32 20 20 20 20 20 25 | 20 41 64 64 20 73 6f 6d |#2 %| Add som|
|000025f0| 65 74 68 69 6e 67 20 74 | 6f 20 73 74 61 72 74 20 |ething t|o start |
|00002600| 6f 66 20 6c 69 73 74 2e | 0a 5c 64 65 66 5c 63 61 |of list.|.\def\ca|
|00002610| 72 23 31 7b 5c 65 78 70 | 61 6e 64 61 66 74 65 72 |r#1{\exp|andafter|
|00002620| 5c 64 6f 63 61 72 23 31 | 5c 64 6f 63 61 72 20 20 |\docar#1|\docar |
|00002630| 25 20 54 61 6b 65 20 66 | 69 72 73 74 20 65 6c 65 |% Take f|irst ele|
|00002640| 6d 65 6e 74 20 6f 66 20 | 6c 69 73 74 0a 5c 64 65 |ment of |list.\de|
|00002650| 66 5c 64 6f 63 61 72 5c | 78 6d 61 72 6b 23 31 5c |f\docar\|xmark#1\|
|00002660| 78 6d 61 72 6b 23 32 5c | 64 6f 63 61 72 7b 23 31 |xmark#2\|docar{#1|
|00002670| 20 20 20 20 25 20 2e 2e | 62 79 20 69 67 6e 6f 72 | % ..|by ignor|
|00002680| 69 6e 67 20 72 65 73 74 | 20 69 6e 20 65 78 70 61 |ing rest| in expa|
|00002690| 6e 73 69 6f 6e 2e 0a 5c | 64 65 66 5c 63 64 72 23 |nsion..\|def\cdr#|
|000026a0| 31 7b 5c 65 78 70 61 6e | 64 61 66 74 65 72 5c 64 |1{\expan|dafter\d|
|000026b0| 6f 63 64 72 23 31 5c 64 | 6f 63 64 72 23 31 25 20 |ocdr#1\d|ocdr#1% |
|000026c0| 53 69 6d 69 6c 61 72 6c | 79 2c 20 64 72 6f 70 20 |Similarl|y, drop |
|000026d0| 66 69 72 73 74 20 65 6c | 65 6d 65 6e 74 2e 0a 5c |first el|ement..\|
|000026e0| 64 65 66 5c 64 6f 63 64 | 72 5c 78 6d 61 72 6b 23 |def\docd|r\xmark#|
|000026f0| 31 5c 78 6d 61 72 6b 23 | 32 5c 64 6f 63 64 72 23 |1\xmark#|2\docdr#|
|00002700| 33 7b 5c 64 65 66 23 33 | 7b 5c 78 6d 61 72 6b 20 |3{\def#3|{\xmark |
|00002710| 23 32 0a 5c 64 65 66 5c | 78 6d 61 72 6b 7b 5c 6e |#2.\def\|xmark{\n|
|00002720| 6f 65 78 70 61 6e 64 5c | 78 6d 61 72 6b 20 20 20 |oexpand\|xmark |
|00002730| 20 20 20 20 20 20 20 20 | 20 20 25 20 4c 69 73 74 | | % List|
|00002740| 20 73 65 70 61 72 61 74 | 6f 72 20 65 78 70 61 6e | separat|or expan|
|00002750| 64 73 20 74 6f 20 73 65 | 6c 66 2e 0a 5c 64 65 66 |ds to se|lf..\def|
|00002760| 5c 6e 69 6c 7b 5c 78 6d | 61 72 6b 20 20 20 20 20 |\nil{\xm|ark |
|00002770| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002780| 20 20 20 25 20 45 6d 70 | 74 79 20 6c 69 73 74 20 | % Emp|ty list |
|00002790| 69 73 20 6a 75 73 74 20 | 61 20 73 65 70 61 72 61 |is just |a separa|
|000027a0| 74 6f 72 2e 0a 5c 65 6e | 64 76 62 0a 3c 2f 70 3e |tor..\en|dvb.</p>|
|000027b0| 0a 3c 70 3e 57 65 20 63 | 61 6c 63 75 6c 61 74 65 |.<p>We c|alculate|
|000027c0| 20 74 68 65 20 6c 65 76 | 65 6c 20 77 69 64 74 68 | the lev|el width|
|000027d0| 73 20 62 79 20 63 61 6c | 6c 69 6e 67 20 2a 5c 73 |s by cal|ling *\s|
|000027e0| 65 74 73 69 7a 65 73 2a | 20 6f 6e 20 74 68 65 20 |etsizes*| on the |
|000027f0| 74 72 65 65 3b 20 69 74 | 0a 77 69 6c 6c 20 69 6e |tree; it|.will in|
|00002800| 20 74 75 72 6e 20 63 61 | 6c 6c 20 69 74 73 65 6c | turn ca|ll itsel|
|00002810| 66 20 72 65 63 75 72 73 | 69 76 65 6c 79 20 66 6f |f recurs|ively fo|
|00002820| 72 20 65 61 63 68 20 6f | 66 20 69 74 73 20 73 75 |r each o|f its su|
|00002830| 62 74 72 65 65 73 2e 20 | 20 54 68 65 0a 74 72 65 |btrees. | The.tre|
|00002840| 65 20 62 65 69 6e 67 20 | 73 69 7a 65 64 20 77 69 |e being |sized wi|
|00002850| 6c 6c 20 62 65 20 69 6e | 20 2a 5c 62 6f 78 30 2a |ll be in| *\box0*|
|00002860| 2c 20 77 68 69 63 68 20 | 69 73 20 75 73 65 64 20 |, which |is used |
|00002870| 61 73 20 73 63 72 61 74 | 63 68 20 69 6e 20 74 68 |as scrat|ch in th|
|00002880| 69 73 0a 6d 61 63 72 6f | 2c 20 61 6e 64 20 74 68 |is.macro|, and th|
|00002890| 65 20 6c 69 73 74 20 6f | 66 20 77 69 64 74 68 73 |e list o|f widths|
|000028a0| 20 61 6c 72 65 61 64 79 | 20 66 6f 75 6e 64 20 66 | already| found f|
|000028b0| 6f 72 20 74 68 69 73 20 | 6c 65 76 65 6c 20 61 6e |or this |level an|
|000028c0| 64 20 62 65 6c 6f 77 0a | 77 69 6c 6c 20 62 65 20 |d below.|will be |
|000028d0| 69 6e 20 2a 5c 74 72 65 | 65 73 69 7a 65 73 2a 20 |in *\tre|esizes* |
|000028e0| 28 69 6e 69 74 69 61 6c | 6c 79 20 2a 5c 6e 69 6c |(initial|ly *\nil|
|000028f0| 2a 29 2e 20 20 57 68 65 | 6e 20 74 68 65 20 6d 61 |*). Whe|n the ma|
|00002900| 63 72 6f 20 65 78 69 74 | 73 2c 0a 2a 5c 74 72 65 |cro exit|s,.*\tre|
|00002910| 65 73 69 7a 65 73 2a 20 | 77 69 6c 6c 20 62 65 20 |esizes* |will be |
|00002920| 75 70 64 61 74 65 64 20 | 77 69 74 68 20 74 68 65 |updated |with the|
|00002930| 20 77 69 64 74 68 73 20 | 66 6f 75 6e 64 20 69 6e | widths |found in|
|00002940| 20 74 68 65 20 76 61 72 | 69 6f 75 73 0a 6c 65 76 | the var|ious.lev|
|00002950| 65 6c 73 20 6f 66 20 74 | 68 65 20 67 69 76 65 6e |els of t|he given|
|00002960| 20 74 72 65 65 20 6f 72 | 20 73 75 62 74 72 65 65 | tree or| subtree|
|00002970| 2e 20 20 41 20 6e 65 77 | 20 2a 5c 64 69 6d 65 6e |. A new| *\dimen|
|00002980| 2a 2c 20 2a 5c 74 72 65 | 65 77 69 64 74 68 2a 2c |*, *\tre|ewidth*,|
|00002990| 20 69 73 0a 75 73 65 64 | 20 77 69 74 68 69 6e 20 | is.used| within |
|000029a0| 74 68 65 20 6d 61 63 72 | 6f 20 74 6f 20 72 65 6d |the macr|o to rem|
|000029b0| 65 6d 62 65 72 20 74 68 | 65 20 70 72 65 76 69 6f |ember th|e previo|
|000029c0| 75 73 20 6d 61 78 69 6d | 75 6d 20 77 69 64 74 68 |us maxim|um width|
|000029d0| 20 61 74 20 74 68 65 0a | 6c 65 76 65 6c 20 6f 66 | at the.|level of|
|000029e0| 20 74 68 65 20 74 72 65 | 65 26 72 73 71 75 6f 3b | the tre|e&rsquo;|
|000029f0| 73 20 72 6f 6f 74 2e 0a | 3c 2f 70 3e 0a 3c 70 3e |s root..|</p>.<p>|
|00002a00| 5c 76 62 0a 5c 64 65 66 | 5c 73 65 74 74 72 65 65 |\vb.\def|\settree|
|00002a10| 73 69 7a 65 73 7b 5c 73 | 65 74 62 6f 78 30 3d 5c |sizes{\s|etbox0=\|
|00002a20| 63 6f 70 79 5c 74 72 65 | 65 62 6f 78 20 5c 67 6c |copy\tre|ebox \gl|
|00002a30| 6f 62 61 6c 5c 6c 65 74 | 5c 74 72 65 65 73 69 7a |obal\let|\treesiz|
|00002a40| 65 73 5c 6e 69 6c 20 5c | 73 65 74 73 69 7a 65 73 |es\nil \|setsizes|
|00002a50| 0a 5c 6e 65 77 64 69 6d | 65 6e 5c 74 72 65 65 77 |.\newdim|en\treew|
|00002a60| 69 64 74 68 20 20 20 20 | 20 20 20 20 20 20 20 20 |idth | |
|00002a70| 20 20 20 20 20 20 20 20 | 20 25 20 57 69 64 74 68 | | % Width|
|00002a80| 20 6f 66 20 74 68 69 73 | 20 70 61 72 74 20 6f 66 | of this| part of|
|00002a90| 20 74 68 65 20 74 72 65 | 65 2e 0a 5c 64 65 66 5c | the tre|e..\def\|
|00002aa0| 73 65 74 73 69 7a 65 73 | 7b 5c 73 65 74 62 6f 78 |setsizes|{\setbox|
|00002ab0| 30 3d 5c 68 62 6f 78 5c | 62 67 72 6f 75 70 20 20 |0=\hbox\|bgroup |
|00002ac0| 20 20 20 25 20 47 65 74 | 20 61 20 68 6f 72 69 7a | % Get| a horiz|
|00002ad0| 20 6c 69 73 74 20 61 73 | 20 61 20 77 6f 72 6b 73 | list as| a works|
|00002ae0| 70 61 63 65 2e 0a 20 20 | 5c 75 6e 68 62 6f 78 30 |pace.. |\unhbox0|
|00002af0| 5c 75 6e 73 6b 69 70 20 | 20 20 20 20 20 20 20 20 |\unskip | |
|00002b00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 25 20 | | % |
|00002b10| 54 61 6b 65 20 74 72 65 | 65 2c 20 75 6e 70 61 63 |Take tre|e, unpac|
|00002b20| 6b 20 69 74 20 69 6e 74 | 6f 20 68 6f 72 69 7a 20 |k it int|o horiz |
|00002b30| 6c 69 73 74 2e 0a 20 20 | 5c 69 6e 69 74 74 72 65 |list.. |\inittre|
|00002b40| 65 77 69 64 74 68 20 20 | 20 20 20 20 20 20 20 20 |ewidth | |
|00002b50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 25 20 | | % |
|00002b60| 47 65 74 20 6f 6c 64 20 | 77 69 64 74 68 20 61 74 |Get old |width at|
|00002b70| 20 74 68 69 73 20 6c 65 | 76 65 6c 2e 0a 20 20 5c | this le|vel.. \|
|00002b80| 73 69 7a 65 73 75 62 74 | 72 65 65 73 20 20 20 20 |sizesubt|rees |
|00002b90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002ba0| 20 20 20 20 20 25 20 52 | 65 63 75 72 73 65 20 74 | % R|ecurse t|
|00002bb0| 68 72 6f 75 67 68 20 61 | 6c 6c 20 73 75 62 74 72 |hrough a|ll subtr|
|00002bc0| 65 65 73 2e 0a 20 20 5c | 73 69 7a 65 6c 65 76 65 |ees.. \|sizeleve|
|00002bd0| 6c 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |l | |
|00002be0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 25 20 4e | | % N|
|00002bf0| 6f 77 20 73 65 74 20 77 | 69 64 74 68 20 66 72 6f |ow set w|idth fro|
|00002c00| 6d 20 72 65 6d 61 69 6e | 69 6e 67 20 5c 76 62 6f |m remain|ing \vbo|
|00002c10| 78 2e 0a 20 20 5c 65 67 | 72 6f 75 70 20 20 20 20 |x.. \eg|roup |
|00002c20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002c30| 20 20 20 20 20 20 20 20 | 20 20 25 20 41 6c 6c 20 | | % All |
|00002c40| 64 6f 6e 65 2c 20 66 69 | 6e 69 73 68 20 6f 75 72 |done, fi|nish our|
|00002c50| 20 5c 68 62 6f 78 2e 0a | 5c 65 6e 64 76 62 0a 3c | \hbox..|\endvb.<|
|00002c60| 2f 70 3e 0a 3c 70 3e 54 | 68 65 20 66 69 72 73 74 |/p>.<p>T|he first|
|00002c70| 20 74 68 69 6e 67 20 2a | 5c 73 65 74 73 69 7a 65 | thing *|\setsize|
|00002c80| 73 2a 20 64 6f 65 73 20 | 69 73 20 74 6f 20 66 69 |s* does |is to fi|
|00002c90| 6e 64 20 6f 75 74 20 77 | 68 61 74 20 74 68 65 20 |nd out w|hat the |
|00002ca0| 70 72 65 76 69 6f 75 73 | 0a 6d 61 78 69 6d 75 6d |previous|.maximum|
|00002cb0| 20 61 74 20 74 68 69 73 | 20 6c 65 76 65 6c 20 77 | at this| level w|
|00002cc0| 61 73 2c 20 61 6e 64 20 | 73 74 6f 72 65 20 69 74 |as, and |store it|
|00002cd0| 20 69 6e 20 2a 5c 74 72 | 65 65 77 69 64 74 68 2a | in *\tr|eewidth*|
|00002ce0| 2e 20 20 49 66 0a 2a 5c | 74 72 65 65 73 69 7a 65 |. If.*\|treesize|
|00002cf0| 73 2a 20 69 73 20 2a 5c | 6e 69 6c 2a 2c 20 77 65 |s* is *\|nil*, we|
|00002d00| 20 68 61 76 65 6e 26 72 | 73 71 75 6f 3b 74 20 73 | haven&r|squo;t s|
|00002d10| 65 65 6e 20 61 6e 79 74 | 68 69 6e 67 20 74 68 69 |een anyt|hing thi|
|00002d20| 73 20 64 65 65 70 20 69 | 6e 20 74 68 65 20 74 72 |s deep i|n the tr|
|00002d30| 65 65 0a 62 65 66 6f 72 | 65 2c 20 73 6f 20 74 68 |ee.befor|e, so th|
|00002d40| 65 20 70 72 65 76 69 6f | 75 73 20 73 69 7a 65 20 |e previo|us size |
|00002d50| 69 73 20 7a 65 72 6f 2e | 20 20 4f 74 68 65 72 77 |is zero.| Otherw|
|00002d60| 69 73 65 2c 20 69 74 20 | 69 73 20 2a 5c 63 61 72 |ise, it |is *\car|
|00002d70| 5c 74 72 65 65 73 69 7a | 65 73 2a 2c 0a 61 6e 64 |\treesiz|es*,.and|
|00002d80| 20 77 65 20 61 6c 73 6f | 20 64 6f 20 2a 5c 63 64 | we also| do *\cd|
|00002d90| 72 5c 74 72 65 65 73 69 | 7a 65 73 2a 20 74 6f 20 |r\treesi|zes* to |
|00002da0| 70 72 65 70 61 72 65 20 | 66 6f 72 20 6c 61 74 65 |prepare |for late|
|00002db0| 72 20 72 65 63 75 72 73 | 69 76 65 20 63 61 6c 6c |r recurs|ive call|
|00002dc0| 73 0a 74 6f 20 2a 5c 73 | 65 74 73 69 7a 65 73 2a |s.to *\s|etsizes*|
|00002dd0| 2e 0a 3c 2f 70 3e 0a 3c | 70 3e 5c 76 62 0a 5c 64 |..</p>.<|p>\vb.\d|
|00002de0| 65 66 5c 69 6e 69 74 74 | 72 65 65 77 69 64 74 68 |ef\initt|reewidth|
|00002df0| 7b 5c 69 66 78 5c 74 72 | 65 65 73 69 7a 65 73 5c |{\ifx\tr|eesizes\|
|00002e00| 6e 69 6c 20 20 20 25 20 | 49 66 20 74 68 69 73 20 |nil % |If this |
|00002e10| 69 73 20 74 68 65 20 66 | 69 72 73 74 20 61 74 20 |is the f|irst at |
|00002e20| 74 68 69 73 20 6c 65 76 | 65 6c 0a 20 20 20 20 5c |this lev|el. \|
|00002e30| 74 72 65 65 77 69 64 74 | 68 3d 30 70 74 20 20 20 |treewidt|h=0pt |
|00002e40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002e50| 20 20 20 25 20 2e 2e 74 | 68 65 6e 20 77 65 20 68 | % ..t|hen we h|
|00002e60| 61 76 65 20 6e 6f 20 70 | 72 65 76 69 6f 75 73 20 |ave no p|revious |
|00002e70| 6d 61 78 20 77 69 64 74 | 68 2e 0a 20 20 5c 65 6c |max widt|h.. \el|
|00002e80| 73 65 20 5c 74 72 65 65 | 77 69 64 74 68 3d 5c 63 |se \tree|width=\c|
|00002e90| 61 72 5c 74 72 65 65 73 | 69 7a 65 73 20 20 20 20 |ar\trees|izes |
|00002ea0| 20 20 20 25 20 4f 74 68 | 65 72 77 69 73 65 20 74 | % Oth|erwise t|
|00002eb0| 61 6b 65 20 6f 6c 64 20 | 6d 61 78 20 6c 65 76 65 |ake old |max leve|
|00002ec0| 6c 20 77 69 64 74 68 0a | 20 20 20 20 5c 67 6c 6f |l width.| \glo|
|00002ed0| 62 61 6c 5c 63 64 72 5c | 74 72 65 65 73 69 7a 65 |bal\cdr\|treesize|
|00002ee0| 73 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |s | |
|00002ef0| 25 20 2e 2e 61 6e 64 20 | 61 64 76 61 6e 63 65 20 |% ..and |advance |
|00002f00| 6c 65 76 65 6c 20 77 69 | 64 74 68 20 73 74 6f 72 |level wi|dth stor|
|00002f10| 61 67 65 0a 20 20 20 20 | 5c 66 69 20 20 20 20 20 |age. |\fi |
|00002f20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002f30| 20 20 20 20 20 20 20 20 | 20 20 20 25 20 2e 2e 69 | | % ..i|
|00002f40| 6e 20 70 72 65 70 61 72 | 61 74 69 6f 6e 20 66 6f |n prepar|ation fo|
|00002f50| 72 20 6e 65 78 74 20 6c | 65 76 65 6c 2e 0a 5c 65 |r next l|evel..\e|
|00002f60| 6e 64 76 62 0a 3c 2f 70 | 3e 0a 3c 70 3e 41 74 20 |ndvb.</p|>.<p>At |
|00002f70| 74 68 69 73 20 70 6f 69 | 6e 74 2c 20 77 65 20 68 |this poi|nt, we h|
|00002f80| 61 76 65 20 61 20 68 6f | 72 69 7a 6f 6e 74 61 6c |ave a ho|rizontal|
|00002f90| 20 6c 69 73 74 20 28 74 | 68 65 20 2a 5c 68 62 6f | list (t|he *\hbo|
|00002fa0| 78 2a 20 69 6e 20 2a 5c | 73 65 74 73 69 7a 65 73 |x* in *\|setsizes|
|00002fb0| 2a 29 0a 63 6f 6e 74 61 | 69 6e 69 6e 67 20 74 68 |*).conta|ining th|
|00002fc0| 65 20 2a 5c 76 62 6f 78 | 2a 20 66 6f 72 20 74 68 |e *\vbox|* for th|
|00002fd0| 65 20 74 65 78 74 20 61 | 74 20 74 68 65 20 72 6f |e text a|t the ro|
|00002fe0| 6f 74 20 6f 66 20 74 68 | 69 73 20 73 75 62 74 72 |ot of th|is subtr|
|00002ff0| 65 65 2c 0a 66 6f 6c 6c | 6f 77 65 64 20 62 79 20 |ee,.foll|owed by |
|00003000| 74 68 65 20 2a 5c 68 62 | 6f 78 2a 65 73 20 66 6f |the *\hb|ox*es fo|
|00003010| 72 20 61 6c 6c 20 6f 66 | 20 69 74 73 20 73 75 62 |r all of| its sub|
|00003020| 2d 73 75 62 74 72 65 65 | 73 2e 20 20 57 65 20 6c |-subtree|s. We l|
|00003030| 6f 6f 70 20 70 75 6c 6c | 69 6e 67 20 62 6f 78 65 |oop pull|ing boxe|
|00003040| 73 0a 66 72 6f 6d 20 74 | 68 65 20 65 6e 64 20 6f |s.from t|he end o|
|00003050| 66 20 74 68 65 20 6c 69 | 73 74 20 77 69 74 68 20 |f the li|st with |
|00003060| 2a 5c 6c 61 73 74 62 6f | 78 2a 20 75 6e 74 69 6c |*\lastbo|x* until|
|00003070| 20 77 65 20 66 69 6e 64 | 20 74 68 65 20 74 65 78 | we find| the tex|
|00003080| 74 20 2a 5c 76 62 6f 78 | 2a 2c 0a 63 61 6c 6c 69 |t *\vbox|*,.calli|
|00003090| 6e 67 20 2a 5c 73 65 74 | 73 69 7a 65 73 2a 20 72 |ng *\set|sizes* r|
|000030a0| 65 63 75 72 73 69 76 65 | 6c 79 20 66 6f 72 20 65 |ecursive|ly for e|
|000030b0| 61 63 68 20 2a 5c 68 62 | 6f 78 2a 20 77 65 20 63 |ach *\hb|ox* we c|
|000030c0| 6f 6d 65 20 61 63 72 6f | 73 73 2e 0a 3c 2f 70 3e |ome acro|ss..</p>|
|000030d0| 0a 3c 70 3e 5c 76 62 0a | 5c 64 65 66 5c 73 69 7a |.<p>\vb.|\def\siz|
|000030e0| 65 73 75 62 74 72 65 65 | 73 7b 5c 6c 6f 6f 70 20 |esubtree|s{\loop |
|000030f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003100| 25 20 46 6f 72 20 65 61 | 63 68 20 62 6f 78 20 69 |% For ea|ch box i|
|00003110| 6e 20 68 6f 72 69 7a 20 | 6c 69 73 74 20 28 73 75 |n horiz |list (su|
|00003120| 62 74 72 65 65 29 0a 20 | 20 5c 73 65 74 62 6f 78 |btree). | \setbox|
|00003130| 30 3d 5c 6c 61 73 74 62 | 6f 78 20 5c 75 6e 73 6b |0=\lastb|ox \unsk|
|00003140| 69 70 20 20 20 20 20 20 | 20 20 20 20 20 20 20 25 |ip | %|
|00003150| 20 2e 2e 70 75 6c 6c 20 | 69 74 20 6f 66 66 20 6c | ..pull |it off l|
|00003160| 69 73 74 20 61 6e 64 20 | 66 6c 75 73 68 20 67 6c |ist and |flush gl|
|00003170| 75 65 2e 0a 20 20 5c 69 | 66 68 62 6f 78 30 20 5c |ue.. \i|fhbox0 \|
|00003180| 73 65 74 73 69 7a 65 73 | 20 20 20 20 20 20 20 20 |setsizes| |
|00003190| 20 20 20 20 20 20 20 20 | 20 20 20 20 25 20 49 66 | | % If|
|000031a0| 20 68 62 6f 78 2c 20 69 | 74 26 72 73 71 75 6f 3b | hbox, i|t&rsquo;|
|000031b0| 73 20 61 20 73 75 62 74 | 72 65 65 20 2d 20 72 65 |s a subt|ree - re|
|000031c0| 63 75 72 73 65 0a 20 20 | 5c 72 65 70 65 61 74 20 |curse. |\repeat |
|000031d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000031e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 25 20 2e | | % .|
|000031f0| 2e 61 6e 64 20 6c 6f 6f | 70 3b 20 65 6e 64 20 6c |.and loo|p; end l|
|00003200| 6f 6f 70 20 6f 6e 20 74 | 72 65 65 20 74 65 78 74 |oop on t|ree text|
|00003210| 2e 0a 5c 65 6e 64 76 62 | 0a 3c 2f 70 3e 0a 3c 70 |..\endvb|.</p>.<p|
|00003220| 3e 4e 6f 77 20 61 6c 6c | 20 74 68 61 74 20 72 65 |>Now all| that re|
|00003230| 6d 61 69 6e 73 20 74 6f | 20 64 6f 20 69 6e 20 74 |mains to| do in t|
|00003240| 68 69 73 20 63 61 6c 6c | 20 74 6f 20 2a 5c 73 65 |his call| to *\se|
|00003250| 74 73 69 7a 65 73 2a 20 | 69 73 20 74 6f 20 75 70 |tsizes* |is to up|
|00003260| 64 61 74 65 0a 2a 5c 74 | 72 65 65 77 69 64 74 68 |date.*\t|reewidth|
|00003270| 2a 20 69 66 20 74 68 65 | 20 74 65 78 74 20 62 6f |* if the| text bo|
|00003280| 78 2c 20 77 68 69 63 68 | 20 63 61 6e 20 62 65 20 |x, which| can be |
|00003290| 66 6f 75 6e 64 20 69 6e | 20 2a 5c 62 6f 78 30 2a |found in| *\box0*|
|000032a0| 2c 20 69 73 20 77 69 64 | 65 72 0a 74 68 61 6e 20 |, is wid|er.than |
|000032b0| 74 68 65 20 70 72 65 76 | 69 6f 75 73 20 6d 61 78 |the prev|ious max|
|000032c0| 69 6d 75 6d 2e 20 20 54 | 68 65 6e 20 77 65 20 61 |imum. T|hen we a|
|000032d0| 64 64 20 74 68 65 20 28 | 70 6f 73 73 69 62 6c 79 |dd the (|possibly|
|000032e0| 20 75 70 64 61 74 65 64 | 29 20 76 61 6c 75 65 0a | updated|) value.|
|000032f0| 6f 66 20 2a 5c 74 72 65 | 65 77 69 64 74 68 2a 20 |of *\tre|ewidth* |
|00003300| 61 73 20 61 20 74 65 78 | 74 20 73 74 72 69 6e 67 |as a tex|t string|
|00003310| 20 62 61 63 6b 20 6f 6e | 74 6f 20 74 68 65 20 68 | back on|to the h|
|00003320| 65 61 64 20 6f 66 20 2a | 5c 74 72 65 65 73 69 7a |ead of *|\treesiz|
|00003330| 65 73 2a 2e 0a 3c 2f 70 | 3e 0a 3c 70 3e 5c 76 62 |es*..</p|>.<p>\vb|
|00003340| 0a 5c 64 65 66 5c 73 69 | 7a 65 6c 65 76 65 6c 7b |.\def\si|zelevel{|
|00003350| 5c 69 66 64 69 6d 5c 74 | 72 65 65 77 69 64 74 68 |\ifdim\t|reewidth|
|00003360| 26 6c 74 3b 5c 77 64 30 | 20 20 20 20 25 20 49 66 |&lt;\wd0| % If|
|00003370| 20 67 72 65 61 74 65 72 | 20 74 68 61 6e 20 70 72 | greater| than pr|
|00003380| 65 76 69 6f 75 73 20 6d | 61 78 69 6d 75 6d 0a 20 |evious m|aximum. |
|00003390| 20 20 5c 74 72 65 65 77 | 69 64 74 68 3d 5c 77 64 | \treew|idth=\wd|
|000033a0| 30 20 5c 66 69 20 20 20 | 20 20 20 20 20 20 20 20 |0 \fi | |
|000033b0| 20 20 20 20 20 20 20 25 | 20 54 68 65 6e 20 73 65 | %| Then se|
|000033c0| 74 20 6d 61 78 20 74 6f | 20 6e 65 77 20 68 69 67 |t max to| new hig|
|000033d0| 68 0a 20 5c 67 6c 6f 62 | 61 6c 5c 63 6f 6e 73 7b |h. \glob|al\cons{|
|000033e0| 5c 74 68 65 5c 74 72 65 | 65 77 69 64 74 68 5c 74 |\the\tre|ewidth\t|
|000033f0| 72 65 65 73 69 7a 65 73 | 25 20 49 6e 20 65 69 74 |reesizes|% In eit|
|00003400| 68 65 72 20 63 61 73 65 | 2c 20 70 75 74 20 62 61 |her case|, put ba|
|00003410| 63 6b 20 6f 6e 20 6c 69 | 73 74 0a 5c 65 6e 64 76 |ck on li|st.\endv|
|00003420| 62 0a 3c 2f 70 3e 0c 0a | 3c 70 3e 5c 62 65 67 69 |b.</p>..|<p>\begi|
|00003430| 6e 73 65 63 74 69 6f 6e | 20 50 61 73 73 20 33 3a |nsection| Pass 3:|
|00003440| 20 54 79 70 65 73 65 74 | 74 69 6e 67 20 74 68 65 | Typeset|ting the|
|00003450| 20 74 72 65 65 0a 3c 2f | 70 3e 0a 3c 70 3e 57 65 | tree.</|p>.<p>We|
|00003460| 20 61 72 65 20 6e 6f 77 | 20 72 65 61 64 79 20 74 | are now| ready t|
|00003470| 6f 20 62 65 67 69 6e 20 | 61 63 74 75 61 6c 20 63 |o begin |actual c|
|00003480| 6f 6e 73 74 72 75 63 74 | 69 6f 6e 20 6f 66 20 74 |onstruct|ion of t|
|00003490| 68 65 20 74 72 65 65 2e | 20 20 54 68 69 73 20 69 |he tree.| This i|
|000034a0| 73 0a 64 6f 6e 65 20 62 | 79 20 63 61 6c 6c 69 6e |s.done b|y callin|
|000034b0| 67 20 2a 5c 6d 61 6b 65 | 74 72 65 65 2a 2c 20 77 |g *\make|tree*, w|
|000034c0| 68 69 63 68 20 6c 69 6b | 65 20 2a 5c 73 65 74 73 |hich lik|e *\sets|
|000034d0| 69 7a 65 73 2a 20 63 61 | 6c 6c 73 20 69 74 73 65 |izes* ca|lls itse|
|000034e0| 6c 66 0a 72 65 63 75 72 | 73 69 76 65 6c 79 20 66 |lf.recur|sively f|
|000034f0| 6f 72 20 61 6c 6c 20 73 | 75 62 74 72 65 65 73 2e |or all s|ubtrees.|
|00003500| 20 20 49 74 20 61 64 64 | 73 20 61 6e 20 2a 5c 68 | It add|s an *\h|
|00003510| 62 6f 78 2a 20 63 6f 6e | 74 61 69 6e 69 6e 67 20 |box* con|taining |
|00003520| 74 68 65 20 67 69 76 65 | 6e 0a 73 75 62 74 72 65 |the give|n.subtre|
|00003530| 65 20 28 77 68 69 63 68 | 20 69 74 20 66 69 6e 64 |e (which| it find|
|00003540| 73 20 69 6e 20 2a 5c 74 | 72 65 65 62 6f 78 2a 29 |s in *\t|reebox*)|
|00003550| 20 74 6f 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 | to the |current |
|00003560| 68 6f 72 69 7a 6f 6e 74 | 61 6c 20 6c 69 73 74 3b |horizont|al list;|
|00003570| 0a 74 68 75 73 20 74 68 | 65 20 6f 75 74 65 72 20 |.thus th|e outer |
|00003580| 63 61 6c 6c 20 74 6f 20 | 2a 5c 6d 61 6b 65 74 72 |call to |*\maketr|
|00003590| 65 65 2a 20 73 65 6e 64 | 73 20 74 68 65 20 77 68 |ee* send|s the wh|
|000035a0| 6f 6c 65 20 74 72 65 65 | 20 69 6e 74 6f 20 5c 54 |ole tree| into \T|
|000035b0| 65 58 26 72 73 71 75 6f | 3b 73 0a 6f 75 74 70 75 |eX&rsquo|;s.outpu|
|000035c0| 74 20 73 74 72 65 61 6d | 2e 20 20 0a 3c 2f 70 3e |t stream|. .</p>|
|000035d0| 0a 3c 70 3e 5c 76 62 0a | 5c 6e 65 77 64 69 6d 65 |.<p>\vb.|\newdime|
|000035e0| 6e 5c 74 72 65 65 68 65 | 69 67 68 74 20 20 20 20 |n\treehe|ight |
|000035f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003600| 25 20 48 65 69 67 68 74 | 20 6f 66 20 74 68 69 73 |% Height| of this|
|00003610| 20 70 61 72 74 20 6f 66 | 20 74 68 65 20 74 72 65 | part of| the tre|
|00003620| 65 2e 0a 5c 6e 65 77 69 | 66 5c 69 66 6c 65 61 66 |e..\newi|f\ifleaf|
|00003630| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003640| 20 20 20 20 20 20 20 20 | 20 20 20 25 20 54 72 65 | | % Tre|
|00003650| 65 20 68 61 73 20 6e 6f | 20 73 75 62 74 72 65 65 |e has no| subtree|
|00003660| 73 20 28 69 73 20 61 20 | 6c 65 61 66 29 2e 0a 5c |s (is a |leaf)..\|
|00003670| 6e 65 77 69 66 5c 69 66 | 62 6f 74 73 75 62 20 20 |newif\if|botsub |
|00003680| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003690| 20 20 20 20 20 20 20 25 | 20 42 6f 74 74 6f 6d 20 | %| Bottom |
|000036a0| 73 75 62 74 72 65 65 20 | 6f 66 20 70 61 72 65 6e |subtree |of paren|
|000036b0| 74 2e 0a 5c 6e 65 77 69 | 66 5c 69 66 74 6f 70 73 |t..\newi|f\iftops|
|000036c0| 75 62 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ub | |
|000036d0| 20 20 20 20 20 20 20 20 | 20 20 20 25 20 54 6f 70 | | % Top|
|000036e0| 20 73 75 62 74 72 65 65 | 20 6f 66 20 70 61 72 65 | subtree| of pare|
|000036f0| 6e 74 2e 0a 5c 64 65 66 | 5c 74 79 70 65 73 65 74 |nt..\def|\typeset|
|00003700| 74 72 65 65 7b 5c 6d 65 | 64 73 6b 69 70 20 5c 6d |tree{\me|dskip \m|
|00003710| 61 6b 65 74 72 65 65 20 | 5c 6d 65 64 73 6b 69 70 |aketree |\medskip|
|00003720| 20 20 20 25 20 4d 61 6b | 65 20 77 68 6f 6c 65 20 | % Mak|e whole |
|00003730| 74 72 65 65 20 77 69 74 | 68 20 73 70 61 63 69 6e |tree wit|h spacin|
|00003740| 67 2e 0a 5c 64 65 66 5c | 6d 61 6b 65 74 72 65 65 |g..\def\|maketree|
|00003750| 7b 5c 68 62 6f 78 7b 5c | 74 72 65 65 77 69 64 74 |{\hbox{\|treewidt|
|00003760| 68 3d 5c 63 61 72 5c 74 | 72 65 65 73 69 7a 65 73 |h=\car\t|reesizes|
|00003770| 20 20 20 25 20 47 65 74 | 20 77 69 64 74 68 20 61 | % Get| width a|
|00003780| 74 20 74 68 69 73 20 6c | 65 76 65 6c 2e 0a 20 20 |t this l|evel.. |
|00003790| 5c 63 64 72 5c 74 72 65 | 65 73 69 7a 65 73 20 20 |\cdr\tre|esizes |
|000037a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000037b0| 20 20 20 20 20 20 25 20 | 53 65 74 20 75 70 20 77 | % |Set up w|
|000037c0| 69 64 74 68 20 6c 69 73 | 74 20 66 6f 72 20 72 65 |idth lis|t for re|
|000037d0| 63 75 72 73 69 6f 6e 2e | 0a 20 20 5c 6d 61 6b 65 |cursion.|. \make|
|000037e0| 73 75 62 74 72 65 65 62 | 6f 78 5c 75 6e 73 6b 69 |subtreeb|ox\unski|
|000037f0| 70 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |p | |
|00003800| 20 25 20 53 65 74 20 5c | 74 72 65 65 62 6f 78 20 | % Set \|treebox |
|00003810| 74 6f 20 74 65 78 74 2c | 20 6d 61 6b 65 20 73 75 |to text,| make su|
|00003820| 62 74 72 65 65 73 2e 0a | 20 20 5c 69 66 6c 65 61 |btrees..| \iflea|
|00003830| 66 20 5c 6d 61 6b 65 6c | 65 61 66 20 20 20 20 20 |f \makel|eaf |
|00003840| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003850| 25 20 4e 6f 20 73 75 62 | 74 72 65 65 73 2c 20 61 |% No sub|trees, a|
|00003860| 64 64 20 67 6c 75 65 2e | 0a 20 20 5c 65 6c 73 65 |dd glue.|. \else|
|00003870| 20 5c 6d 61 6b 65 70 61 | 72 65 6e 74 20 5c 66 69 | \makepa|rent \fi|
|00003880| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 25 | | %|
|00003890| 20 48 61 76 65 20 73 75 | 62 74 72 65 65 73 2c 20 | Have su|btrees, |
|000038a0| 73 74 69 63 6b 20 74 68 | 65 6d 20 61 74 20 72 69 |stick th|em at ri|
|000038b0| 67 68 74 2e 0a 5c 65 6e | 64 76 62 0a 3c 2f 70 3e |ght..\en|dvb.</p>|
|000038c0| 0a 3c 70 3e 41 66 74 65 | 72 20 2a 5c 6d 61 6b 65 |.<p>Afte|r *\make|
|000038d0| 74 72 65 65 2a 20 73 65 | 74 73 20 2a 5c 74 72 65 |tree* se|ts *\tre|
|000038e0| 65 77 69 64 74 68 2a 20 | 66 72 6f 6d 20 2a 5c 74 |ewidth* |from *\t|
|000038f0| 72 65 65 73 69 7a 65 73 | 2a 2c 20 69 74 20 63 61 |reesizes|*, it ca|
|00003900| 6c 6c 73 0a 2a 5c 6d 61 | 6b 65 73 75 62 74 72 65 |lls.*\ma|kesubtre|
|00003910| 65 62 6f 78 2a 2e 20 20 | 54 68 69 73 20 6f 70 65 |ebox*. |This ope|
|00003920| 6e 73 20 75 70 20 74 68 | 65 20 68 6f 72 69 7a 6f |ns up th|e horizo|
|00003930| 6e 74 61 6c 20 6c 69 73 | 74 20 64 65 73 63 72 69 |ntal lis|t descri|
|00003940| 62 69 6e 67 20 74 68 69 | 73 0a 6c 65 76 65 6c 20 |bing thi|s.level |
|00003950| 6f 66 20 74 68 65 20 74 | 72 65 65 2c 20 61 6e 64 |of the t|ree, and|
|00003960| 20 63 68 65 63 6b 73 20 | 77 68 65 74 68 65 72 20 | checks |whether |
|00003970| 69 74 20 68 61 73 20 73 | 75 62 74 72 65 65 73 2e |it has s|ubtrees.|
|00003980| 20 20 49 66 20 6e 6f 74 | 2c 0a 2a 5c 69 66 6c 65 | If not|,.*\ifle|
|00003990| 61 66 2a 20 69 73 20 73 | 65 74 20 74 6f 20 74 72 |af* is s|et to tr|
|000039a0| 75 65 3b 20 6f 74 68 65 | 72 77 69 73 65 20 69 74 |ue; othe|rwise it|
|000039b0| 20 69 73 20 73 65 74 20 | 74 6f 20 66 61 6c 73 65 | is set |to false|
|000039c0| 2c 20 61 6e 64 20 2a 5c | 62 6f 78 30 2a 0a 69 73 |, and *\|box0*.is|
|000039d0| 20 73 65 74 20 74 6f 20 | 63 6f 6e 74 61 69 6e 20 | set to |contain |
|000039e0| 61 20 2a 5c 76 62 6f 78 | 2a 20 6f 66 20 74 68 65 |a *\vbox|* of the|
|000039f0| 6d 20 77 69 74 68 20 74 | 68 65 69 72 20 63 6f 6e |m with t|heir con|
|00003a00| 6e 65 63 74 69 6e 67 20 | 72 75 6c 65 73 2c 0a 65 |necting |rules,.e|
|00003a10| 78 63 65 70 74 20 66 6f | 72 20 74 68 65 20 68 6f |xcept fo|r the ho|
|00003a20| 72 69 7a 6f 6e 74 61 6c | 20 72 75 6c 65 20 6c 65 |rizontal| rule le|
|00003a30| 61 64 69 6e 67 20 66 72 | 6f 6d 20 74 68 65 20 74 |ading fr|om the t|
|00003a40| 72 65 65 20 74 65 78 74 | 20 74 6f 20 74 68 65 0a |ree text| to the.|
|00003a50| 73 75 62 74 72 65 65 73 | 2e 20 20 49 6e 20 61 6e |subtrees|. In an|
|00003a60| 79 20 63 61 73 65 20 2a | 5c 74 72 65 65 62 6f 78 |y case *|\treebox|
|00003a70| 2a 20 69 73 20 73 65 74 | 20 74 6f 20 74 68 65 20 |* is set| to the |
|00003a80| 2a 5c 76 62 6f 78 2a 20 | 63 6f 6e 74 61 69 6e 69 |*\vbox* |containi|
|00003a90| 6e 67 20 74 68 65 0a 74 | 72 65 65 20 74 65 78 74 |ng the.t|ree text|
|00003aa0| 2e 0a 3c 2f 70 3e 0a 3c | 70 3e 5c 76 62 0a 3c 2f |..</p>.<|p>\vb.</|
|00003ab0| 70 3e 0a 3c 70 3e 7b 5c | 63 61 74 63 6f 64 65 26 |p>.<p>{\|catcode&|
|00003ac0| 6c 73 71 75 6f 3b 31 3d | 31 20 20 20 20 20 20 20 |lsquo;1=|1 |
|00003ad0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003ae0| 20 20 20 25 20 42 65 20 | 61 62 6c 65 20 74 6f 20 | % Be |able to |
|00003af0| 75 73 65 20 5c 76 6f 69 | 64 62 40 78 2e 0a 5c 67 |use \voi|db@x..\g|
|00003b00| 64 65 66 5c 6d 61 6b 65 | 73 75 62 74 72 65 65 62 |def\make|subtreeb|
|00003b10| 6f 78 7b 5c 75 6e 68 62 | 6f 78 5c 74 72 65 65 62 |ox{\unhb|ox\treeb|
|00003b20| 6f 78 20 20 20 20 25 20 | 4f 70 65 6e 20 75 70 20 |ox % |Open up |
|00003b30| 74 72 65 65 20 6f 72 20 | 73 75 62 74 72 65 65 2e |tree or |subtree.|
|00003b40| 0a 20 20 5c 75 6e 73 6b | 69 70 5c 67 6c 6f 62 61 |. \unsk|ip\globa|
|00003b50| 6c 5c 73 65 74 62 6f 78 | 5c 74 72 65 65 62 6f 78 |l\setbox|\treebox|
|00003b60| 5c 6c 61 73 74 62 6f 78 | 20 25 20 50 69 63 6b 20 |\lastbox| % Pick |
|00003b70| 75 70 20 76 65 72 79 20 | 6c 61 73 74 20 62 6f 78 |up very |last box|
|00003b80| 2e 0a 20 20 5c 69 66 76 | 62 6f 78 5c 74 72 65 65 |.. \ifv|box\tree|
|00003b90| 62 6f 78 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |box | |
|00003ba0| 20 20 20 20 20 20 20 20 | 20 20 25 20 49 66 20 77 | | % If w|
|00003bb0| 65 26 72 73 71 75 6f 3b | 72 65 20 61 6c 72 65 61 |e&rsquo;|re alrea|
|00003bc0| 64 79 20 61 74 20 74 68 | 65 20 5c 76 62 6f 78 0a |dy at th|e \vbox.|
|00003bd0| 20 20 20 20 5c 67 6c 6f | 62 61 6c 5c 6c 65 61 66 | \glo|bal\leaf|
|00003be0| 74 72 75 65 20 5c 6c 65 | 74 5c 6e 65 78 74 5c 72 |true \le|t\next\r|
|00003bf0| 65 6c 61 78 20 20 20 20 | 25 20 2e 2e 74 68 65 6e |elax |% ..then|
|00003c00| 20 74 68 69 73 20 69 73 | 20 61 20 6c 65 61 66 2e | this is| a leaf.|
|00003c10| 0a 20 20 5c 65 6c 73 65 | 20 5c 62 6f 74 73 75 62 |. \else| \botsub|
|00003c20| 74 72 75 65 20 20 20 20 | 20 20 20 20 20 20 20 20 |true | |
|00003c30| 20 20 20 20 20 20 20 20 | 20 25 20 4f 74 68 65 72 | | % Other|
|00003c40| 77 69 73 65 2c 20 77 65 | 20 68 61 76 65 20 73 75 |wise, we| have su|
|00003c50| 62 74 72 65 65 73 2e 0a | 20 20 20 20 5c 73 65 74 |btrees..| \set|
|00003c60| 62 6f 78 30 5c 62 6f 78 | 5c 76 6f 69 64 62 40 78 |box0\box|\voidb@x|
|00003c70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003c80| 25 20 49 6e 69 74 20 73 | 74 61 63 6b 20 6f 66 20 |% Init s|tack of |
|00003c90| 70 72 6f 63 65 73 73 65 | 64 20 73 75 62 73 0a 20 |processe|d subs. |
|00003ca0| 20 20 20 5c 62 6f 74 73 | 75 62 74 72 75 65 20 5c | \bots|ubtrue \|
|00003cb0| 6c 65 74 5c 6e 65 78 74 | 5c 6d 61 6b 65 73 75 62 |let\next|\makesub|
|00003cc0| 74 72 65 65 20 20 20 25 | 20 2e 2e 61 6e 64 20 63 |tree %| ..and c|
|00003cd0| 61 6c 6c 20 5c 6d 61 6b | 65 74 72 65 65 20 6f 6e |all \mak|etree on|
|00003ce0| 20 74 68 65 6d 2e 0a 20 | 20 5c 66 69 20 5c 6e 65 | them.. | \fi \ne|
|00003cf0| 78 74 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |xt | |
|00003d00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 25 20 46 | | % F|
|00003d10| 69 6e 69 73 68 20 75 70 | 20 66 6f 72 20 77 68 69 |inish up| for whi|
|00003d20| 63 68 65 76 65 72 20 69 | 74 20 77 61 73 2e 0a 5c |chever i|t was..\|
|00003d30| 65 6e 64 76 62 0a 3c 2f | 70 3e 0a 3c 70 3e 49 66 |endvb.</|p>.<p>If|
|00003d40| 20 74 68 69 73 20 74 72 | 65 65 20 6f 72 20 73 75 | this tr|ee or su|
|00003d50| 62 74 72 65 65 20 69 74 | 73 65 6c 66 20 68 61 73 |btree it|self has|
|00003d60| 20 73 75 62 74 72 65 65 | 73 2c 20 77 65 20 6e 65 | subtree|s, we ne|
|00003d70| 65 64 20 74 6f 20 70 75 | 74 20 74 68 65 6d 20 61 |ed to pu|t them a|
|00003d80| 6e 64 0a 74 68 65 69 72 | 20 63 6f 6e 6e 65 63 74 |nd.their| connect|
|00003d90| 69 6f 6e 73 20 69 6e 20 | 2a 5c 62 6f 78 30 2a 20 |ions in |*\box0* |
|00003da0| 66 6f 72 20 2a 5c 6d 61 | 6b 65 73 75 62 74 72 65 |for *\ma|kesubtre|
|00003db0| 65 62 6f 78 2a 2e 20 20 | 57 65 20 63 6f 6d 65 20 |ebox*. |We come |
|00003dc0| 68 65 72 65 20 77 69 74 | 68 0a 74 68 65 20 62 6f |here wit|h.the bo|
|00003dd0| 74 74 6f 6d 20 73 75 62 | 74 72 65 65 20 69 6e 20 |ttom sub|tree in |
|00003de0| 2a 5c 74 72 65 65 62 6f | 78 2a 2c 20 74 68 65 20 |*\treebo|x*, the |
|00003df0| 72 65 6d 61 69 6e 69 6e | 67 20 6c 69 73 74 20 6f |remainin|g list o|
|00003e00| 66 20 73 75 62 74 72 65 | 65 73 20 69 6e 0a 74 68 |f subtre|es in.th|
|00003e10| 65 20 63 75 72 72 65 6e | 74 20 68 6f 72 69 7a 6f |e curren|t horizo|
|00003e20| 6e 74 61 6c 20 6c 69 73 | 74 2c 20 61 6e 64 20 74 |ntal lis|t, and t|
|00003e30| 68 65 20 61 6c 72 65 61 | 64 79 20 70 72 6f 63 65 |he alrea|dy proce|
|00003e40| 73 73 65 64 20 73 75 62 | 74 72 65 65 73 0a 73 74 |ssed sub|trees.st|
|00003e50| 61 63 6b 65 64 20 69 6e | 20 2a 5c 62 6f 78 30 2a |acked in| *\box0*|
|00003e60| 2e 20 20 54 68 65 20 2a | 5c 69 66 62 6f 74 73 75 |. The *|\ifbotsu|
|00003e70| 62 2a 20 74 65 73 74 20 | 77 69 6c 6c 20 62 65 20 |b* test |will be |
|00003e80| 74 72 75 65 20 66 6f 72 | 20 74 68 65 20 66 69 72 |true for| the fir|
|00003e90| 73 74 0a 63 61 6c 6c 2c | 20 74 68 61 74 20 69 73 |st.call,| that is|
|00003ea0| 2c 20 74 68 65 20 62 6f | 74 74 6f 6d 20 73 75 62 |, the bo|ttom sub|
|00003eb0| 74 72 65 65 2e 20 20 48 | 65 72 65 20 77 65 20 70 |tree. H|ere we p|
|00003ec0| 72 6f 63 65 73 73 20 74 | 68 65 20 73 75 62 74 72 |rocess t|he subtr|
|00003ed0| 65 65 20 69 6e 0a 2a 5c | 74 72 65 65 62 6f 78 2a |ee in.*\|treebox*|
|00003ee0| 2e 20 20 49 66 20 74 68 | 69 73 20 69 73 20 74 68 |. If th|is is th|
|00003ef0| 65 20 74 6f 70 20 73 75 | 62 74 72 65 65 2c 20 77 |e top su|btree, w|
|00003f00| 65 20 72 65 74 75 72 6e | 3b 20 6f 74 68 65 72 77 |e return|; otherw|
|00003f10| 69 73 65 20 77 65 20 74 | 61 69 6c 0a 72 65 63 75 |ise we t|ail.recu|
|00003f20| 72 73 65 20 74 6f 20 70 | 72 6f 63 65 73 73 20 74 |rse to p|rocess t|
|00003f30| 68 65 20 72 65 6d 61 69 | 6e 69 6e 67 20 73 75 62 |he remai|ning sub|
|00003f40| 74 72 65 65 73 2e 20 20 | 57 65 20 75 73 65 20 2a |trees. |We use *|
|00003f50| 5c 62 6f 78 31 2a 20 61 | 73 0a 61 6e 6f 74 68 65 |\box1* a|s.anothe|
|00003f60| 72 20 73 63 72 61 74 63 | 68 20 76 61 72 69 61 62 |r scratc|h variab|
|00003f70| 6c 65 3b 20 74 68 69 73 | 20 69 73 20 73 61 66 65 |le; this| is safe|
|00003f80| 20 62 65 63 61 75 73 65 | 20 74 68 65 20 2a 5c 68 | because| the *\h|
|00003f90| 62 6f 78 2a 20 69 6e 20 | 2a 5c 6d 61 6b 65 74 72 |box* in |*\maketr|
|00003fa0| 65 65 2a 0a 70 75 74 73 | 20 75 73 20 69 6e 73 69 |ee*.puts| us insi|
|00003fb0| 64 65 20 61 20 67 72 6f | 75 70 2c 20 61 6e 64 20 |de a gro|up, and |
|00003fc0| 61 6c 73 6f 20 62 65 63 | 61 75 73 65 20 77 65 20 |also bec|ause we |
|00003fd0| 61 72 65 20 6e 6f 74 20 | 63 68 61 6e 67 69 6e 67 |are not |changing|
|00003fe0| 20 74 68 65 20 6f 75 74 | 70 75 74 20 6c 69 73 74 | the out|put list|
|00003ff0| 2e 0a 3c 2f 70 3e 0a 3c | 70 3e 5c 70 65 6e 61 6c |..</p>.<|p>\penal|
|00004000| 74 79 2d 32 30 30 09 09 | 25 25 25 25 25 25 25 25 |ty-200..|%%%%%%%%|
|00004010| 25 25 25 25 25 25 25 25 | 25 25 25 25 09 61 64 64 |%%%%%%%%|%%%%.add|
|00004020| 65 64 20 66 6f 72 20 54 | 55 47 62 6f 61 74 0a 3c |ed for T|UGboat.<|
|00004030| 2f 70 3e 0a 3c 70 3e 5c | 76 62 0a 3c 2f 70 3e 0a |/p>.<p>\|vb.</p>.|
|00004040| 3c 70 3e 5c 64 65 66 5c | 6d 61 6b 65 73 75 62 74 |<p>\def\|makesubt|
|00004050| 72 65 65 7b 5c 73 65 74 | 62 6f 78 31 5c 6d 61 6b |ree{\set|box1\mak|
|00004060| 65 74 72 65 65 20 20 20 | 20 20 20 25 20 43 61 6c |etree | % Cal|
|00004070| 6c 20 5c 6d 61 6b 65 74 | 72 65 65 20 6f 6e 20 74 |l \maket|ree on t|
|00004080| 68 69 73 20 73 75 62 74 | 72 65 65 2e 0a 20 20 5c |his subt|ree.. \|
|00004090| 75 6e 73 6b 69 70 5c 67 | 6c 6f 62 61 6c 5c 73 65 |unskip\g|lobal\se|
|000040a0| 74 62 6f 78 5c 74 72 65 | 65 62 6f 78 5c 6c 61 73 |tbox\tre|ebox\las|
|000040b0| 74 62 6f 78 20 25 20 50 | 69 63 6b 20 75 70 20 62 |tbox % P|ick up b|
|000040c0| 6f 78 20 62 65 66 6f 72 | 65 20 69 74 2e 0a 20 20 |ox befor|e it.. |
|000040d0| 5c 74 72 65 65 68 65 69 | 67 68 74 3d 5c 68 74 31 |\treehei|ght=\ht1|
|000040e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000040f0| 20 20 20 20 20 20 25 20 | 47 65 74 20 68 65 69 67 | % |Get heig|
|00004100| 68 74 20 6f 66 20 73 75 | 62 74 72 65 65 20 77 65 |ht of su|btree we|
|00004110| 20 6d 61 64 65 0a 20 20 | 5c 61 64 76 61 6e 63 65 | made. |\advance|
|00004120| 5c 74 72 65 65 68 65 69 | 67 68 74 20 32 65 78 20 |\treehei|ght 2ex |
|00004130| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 25 20 | | % |
|00004140| 41 64 64 20 73 6f 6d 65 | 20 72 6f 6f 6d 20 61 72 |Add some| room ar|
|00004150| 6f 75 6e 64 20 74 68 65 | 20 65 64 67 65 73 0a 20 |ound the| edges. |
|00004160| 20 5c 69 66 68 62 6f 78 | 5c 74 72 65 65 62 6f 78 | \ifhbox|\treebox|
|00004170| 20 5c 74 6f 70 73 75 62 | 66 61 6c 73 65 20 20 20 | \topsub|false |
|00004180| 20 20 20 20 20 20 20 25 | 20 49 66 20 70 69 63 6b | %| If pick|
|00004190| 65 64 20 75 70 20 62 6f | 78 20 69 73 20 61 20 5c |ed up bo|x is a \|
|000041a0| 76 62 6f 78 2c 0a 20 20 | 20 20 5c 65 6c 73 65 20 |vbox,. | \else |
|000041b0| 5c 74 6f 70 73 75 62 74 | 72 75 65 20 5c 66 69 20 |\topsubt|rue \fi |
|000041c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 25 20 | | % |
|000041d0| 2e 2e 74 68 69 73 20 69 | 73 20 74 68 65 20 74 6f |..this i|s the to|
|000041e0| 70 2c 20 6f 74 68 65 72 | 77 69 73 65 20 6e 6f 74 |p, other|wise not|
|000041f0| 2e 0a 20 20 5c 61 64 64 | 73 75 62 74 72 65 65 62 |.. \add|subtreeb|
|00004200| 6f 78 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ox | |
|00004210| 20 20 20 20 20 20 20 20 | 20 20 25 20 53 74 61 63 | | % Stac|
|00004220| 6b 20 73 75 62 74 72 65 | 65 20 77 69 74 68 20 74 |k subtre|e with t|
|00004230| 68 65 20 72 65 73 74 2e | 0a 20 20 5c 69 66 74 6f |he rest.|. \ifto|
|00004240| 70 73 75 62 20 5c 67 6c | 6f 62 61 6c 5c 6c 65 61 |psub \gl|obal\lea|
|00004250| 66 66 61 6c 73 65 20 20 | 20 20 20 20 20 20 20 20 |ffalse | |
|00004260| 20 25 20 49 66 20 74 6f | 70 2c 20 72 65 6d 65 6d | % If to|p, remem|
|00004270| 62 65 72 20 6e 6f 74 20 | 61 20 6c 65 61 66 0a 20 |ber not |a leaf. |
|00004280| 20 20 20 5c 6c 65 74 5c | 6e 65 78 74 5c 72 65 6c | \let\|next\rel|
|00004290| 61 78 20 5c 65 6c 73 65 | 20 20 20 20 20 20 20 20 |ax \else| |
|000042a0| 20 20 20 20 20 20 20 25 | 20 2e 2e 28 61 66 74 65 | %| ..(afte|
|000042b0| 72 20 72 65 63 75 72 73 | 69 6f 6e 29 2c 20 73 65 |r recurs|ion), se|
|000042c0| 74 20 72 65 74 75 72 6e | 2e 0a 20 20 20 20 5c 62 |t return|.. \b|
|000042d0| 6f 74 73 75 62 66 61 6c | 73 65 20 5c 6c 65 74 5c |otsubfal|se \let\|
|000042e0| 6e 65 78 74 5c 6d 61 6b | 65 73 75 62 74 72 65 65 |next\mak|esubtree|
|000042f0| 20 20 25 20 4f 74 68 65 | 72 77 69 73 65 2c 20 77 | % Othe|rwise, w|
|00004300| 65 20 68 61 76 65 20 6d | 6f 72 65 20 73 75 62 74 |e have m|ore subt|
|00004310| 72 65 65 73 2e 0a 20 20 | 5c 66 69 20 5c 6e 65 78 |rees.. |\fi \nex|
|00004320| 74 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |t | |
|00004330| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 25 20 44 | | % D|
|00004340| 6f 20 74 61 69 6c 20 72 | 65 63 75 72 73 69 6f 6e |o tail r|ecursion|
|00004350| 20 6f 72 20 72 65 74 75 | 72 6e 2e 0a 5c 65 6e 64 | or retu|rn..\end|
|00004360| 76 62 0a 3c 2f 70 3e 0a | 3c 70 3e 45 61 63 68 20 |vb.</p>.|<p>Each |
|00004370| 73 75 62 74 72 65 65 20 | 69 6e 20 74 68 65 20 6c |subtree |in the l|
|00004380| 69 73 74 20 69 73 20 70 | 72 6f 63 65 73 73 65 64 |ist is p|rocessed|
|00004390| 20 61 6e 64 20 73 74 61 | 63 6b 65 64 20 69 6e 20 | and sta|cked in |
|000043a0| 2a 5c 62 6f 78 30 2a 3b | 20 74 68 69 73 20 69 73 |*\box0*;| this is|
|000043b0| 0a 64 6f 6e 65 20 62 79 | 20 2a 5c 61 64 64 73 75 |.done by| *\addsu|
|000043c0| 62 74 72 65 65 62 6f 78 | 2a 2c 20 77 68 69 63 68 |btreebox|*, which|
|000043d0| 20 63 61 6c 6c 73 20 2a | 5c 73 75 62 74 72 65 65 | calls *|\subtree|
|000043e0| 62 6f 78 2a 20 74 6f 20 | 61 64 64 20 63 6f 6e 6e |box* to |add conn|
|000043f0| 65 63 74 69 6e 67 0a 72 | 75 6c 65 73 20 74 6f 20 |ecting.r|ules to |
|00004400| 74 68 65 20 73 75 62 74 | 72 65 65 20 69 6e 20 2a |the subt|ree in *|
|00004410| 5c 62 6f 78 31 2a 2c 20 | 61 6e 64 20 61 70 70 65 |\box1*, |and appe|
|00004420| 6e 64 73 20 74 6f 20 74 | 68 61 74 20 74 68 65 20 |nds to t|hat the |
|00004430| 6f 6c 64 20 63 6f 6e 74 | 65 6e 74 73 0a 6f 66 20 |old cont|ents.of |
|00004440| 2a 5c 62 6f 78 30 2a 2e | 20 20 54 68 65 20 76 65 |*\box0*.| The ve|
|00004450| 72 74 69 63 61 6c 20 63 | 6f 6e 6e 65 63 74 69 6e |rtical c|onnectin|
|00004460| 67 20 72 75 6c 65 73 20 | 69 6e 20 74 68 65 20 74 |g rules |in the t|
|00004470| 72 65 65 20 61 72 65 20 | 6d 61 64 65 20 77 69 74 |ree are |made wit|
|00004480| 68 0a 74 61 6c 6c 20 6e | 61 72 72 6f 77 20 2a 5c |h.tall n|arrow *\|
|00004490| 68 72 75 6c 65 2a 73 20 | 72 61 74 68 65 72 20 74 |hrule*s |rather t|
|000044a0| 68 61 6e 20 61 20 6d 6f | 72 65 20 73 69 6d 70 6c |han a mo|re simpl|
|000044b0| 65 20 63 61 6c 6c 73 20 | 74 6f 20 2a 5c 76 72 75 |e calls |to *\vru|
|000044c0| 6c 65 2a 2c 0a 62 65 63 | 61 75 73 65 20 74 68 65 |le*,.bec|ause the|
|000044d0| 79 20 61 72 65 20 6d 61 | 64 65 20 69 6e 73 69 64 |y are ma|de insid|
|000044e0| 65 20 61 20 2a 5c 76 62 | 6f 78 2a 2e 0a 3c 2f 70 |e a *\vb|ox*..</p|
|000044f0| 3e 0a 3c 70 3e 5c 76 62 | 0a 5c 64 65 66 5c 61 64 |>.<p>\vb|.\def\ad|
|00004500| 64 73 75 62 74 72 65 65 | 62 6f 78 7b 5c 73 65 74 |dsubtree|box{\set|
|00004510| 62 6f 78 30 3d 5c 76 62 | 6f 78 7b 5c 73 75 62 74 |box0=\vb|ox{\subt|
|00004520| 72 65 65 62 6f 78 5c 75 | 6e 76 62 6f 78 30 0a 5c |reebox\u|nvbox0.\|
|00004530| 64 65 66 5c 73 75 62 74 | 72 65 65 62 6f 78 7b 5c |def\subt|reebox{\|
|00004540| 68 62 6f 78 5c 62 67 72 | 6f 75 70 20 20 20 20 20 |hbox\bgr|oup |
|00004550| 20 20 20 20 20 20 20 25 | 20 53 74 61 72 74 20 5c | %| Start \|
|00004560| 68 62 6f 78 20 6f 66 20 | 74 72 65 65 20 61 6e 64 |hbox of |tree and|
|00004570| 20 6c 69 6e 65 73 0a 20 | 20 5c 76 62 6f 78 20 74 | lines. | \vbox t|
|00004580| 6f 20 5c 74 72 65 65 68 | 65 69 67 68 74 5c 62 67 |o \treeh|eight\bg|
|00004590| 72 6f 75 70 20 20 20 20 | 20 20 20 20 20 20 20 25 |roup | %|
|000045a0| 20 53 74 61 72 74 20 5c | 76 62 6f 78 20 66 6f 72 | Start \|vbox for|
|000045b0| 20 76 65 72 74 69 63 61 | 6c 20 72 75 6c 65 73 2e | vertica|l rules.|
|000045c0| 0a 20 20 20 20 5c 69 66 | 62 6f 74 73 75 62 20 5c |. \if|botsub \|
|000045d0| 69 66 74 6f 70 73 75 62 | 20 5c 76 66 69 6c 20 20 |iftopsub| \vfil |
|000045e0| 20 20 20 20 20 20 20 20 | 20 25 20 49 66 20 62 6f | | % If bo|
|000045f0| 74 68 20 62 6f 74 74 6f | 6d 20 61 6e 64 20 74 6f |th botto|m and to|
|00004600| 70 20 73 75 62 74 72 65 | 65 0a 20 20 20 20 20 20 |p subtre|e. |
|00004610| 20 20 5c 68 72 75 6c 65 | 20 77 69 64 74 68 20 30 | \hrule| width 0|
|00004620| 2e 34 70 74 20 20 20 20 | 20 20 20 20 20 20 20 20 |.4pt | |
|00004630| 20 20 25 20 2e 2e 76 65 | 72 74 69 63 61 6c 20 72 | % ..ve|rtical r|
|00004640| 75 6c 65 20 69 73 20 6a | 75 73 74 20 61 20 64 6f |ule is j|ust a do|
|00004650| 74 2e 0a 20 20 20 20 20 | 20 5c 65 6c 73 65 20 5c |t.. | \else \|
|00004660| 74 72 65 65 68 61 6c 66 | 72 75 6c 65 20 5c 66 69 |treehalf|rule \fi|
|00004670| 20 5c 76 66 69 6c 20 20 | 20 20 20 25 20 42 6f 74 | \vfil | % Bot|
|00004680| 74 6f 6d 20 67 65 74 73 | 20 68 61 6c 66 2d 68 65 |tom gets| half-he|
|00004690| 69 67 68 74 20 72 75 6c | 65 2e 0a 20 20 20 20 5c |ight rul|e.. \|
|000046a0| 65 6c 73 65 20 5c 69 66 | 74 6f 70 73 75 62 20 5c |else \if|topsub \|
|000046b0| 76 66 69 6c 20 5c 74 72 | 65 65 68 61 6c 66 72 75 |vfil \tr|eehalfru|
|000046c0| 6c 65 20 25 20 54 6f 70 | 20 67 65 74 73 20 68 61 |le % Top| gets ha|
|000046d0| 6c 66 2d 68 65 69 67 68 | 74 20 74 68 65 20 6f 74 |lf-heigh|t the ot|
|000046e0| 68 65 72 20 77 61 79 2e | 0a 20 20 20 20 20 20 5c |her way.|. \|
|000046f0| 65 6c 73 65 20 5c 68 72 | 75 6c 65 20 77 69 64 74 |else \hr|ule widt|
|00004700| 68 20 30 2e 34 70 74 20 | 68 65 69 67 68 74 20 5c |h 0.4pt |height \|
|00004710| 74 72 65 65 68 65 69 67 | 68 74 20 5c 66 69 5c 66 |treeheig|ht \fi\f|
|00004720| 69 20 25 20 4d 69 64 64 | 6c 65 2c 20 66 75 6c 6c |i % Midd|le, full|
|00004730| 20 68 65 69 67 68 74 2e | 0a 20 20 20 20 5c 65 67 | height.|. \eg|
|00004740| 72 6f 75 70 20 20 20 20 | 20 20 20 20 20 20 20 20 |roup | |
|00004750| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004760| 20 25 20 46 69 6e 69 73 | 68 20 76 65 72 74 69 63 | % Finis|h vertic|
|00004770| 61 6c 20 72 75 6c 65 20 | 5c 76 62 6f 78 2e 0a 20 |al rule |\vbox.. |
|00004780| 20 5c 74 72 65 65 63 74 | 72 62 6f 78 7b 5c 68 72 | \treect|rbox{\hr|
|00004790| 75 6c 65 20 77 69 64 74 | 68 20 31 65 6d 5c 68 73 |ule widt|h 1em\hs|
|000047a0| 6b 69 70 20 30 2e 32 65 | 6d 5c 74 72 65 65 63 74 |kip 0.2e|m\treect|
|000047b0| 72 62 6f 78 7b 5c 62 6f | 78 31 5c 65 67 72 6f 75 |rbox{\bo|x1\egrou|
|000047c0| 70 0a 5c 65 6e 64 76 62 | 0a 3c 2f 70 3e 0a 3c 70 |p.\endvb|.</p>.<p|
|000047d0| 3e 54 68 65 20 6c 61 73 | 74 20 6c 69 6e 65 20 6f |>The las|t line o|
|000047e0| 66 20 74 68 65 20 64 65 | 66 69 6e 69 74 69 6f 6e |f the de|finition|
|000047f0| 20 6f 66 20 2a 5c 73 75 | 62 74 72 65 65 62 6f 78 | of *\su|btreebox|
|00004800| 2a 20 63 61 6c 6c 73 20 | 2a 5c 74 72 65 65 63 74 |* calls |*\treect|
|00004810| 72 62 6f 78 2a 0a 74 77 | 69 63 65 3a 20 6f 6e 63 |rbox*.tw|ice: onc|
|00004820| 65 20 66 6f 72 20 74 68 | 65 20 68 6f 72 69 7a 6f |e for th|e horizo|
|00004830| 6e 74 61 6c 20 63 6f 6e | 6e 65 63 74 69 6e 67 20 |ntal con|necting |
|00004840| 72 75 6c 65 2c 20 61 6e | 64 20 6f 6e 63 65 20 66 |rule, an|d once f|
|00004850| 6f 72 20 74 68 65 0a 73 | 75 62 74 72 65 65 20 62 |or the.s|ubtree b|
|00004860| 6f 78 20 69 74 73 65 6c | 66 2e 20 20 54 68 69 73 |ox itsel|f. This|
|00004870| 20 6d 61 63 72 6f 20 63 | 65 6e 74 65 72 73 20 69 | macro c|enters i|
|00004880| 74 73 20 61 72 67 75 6d | 65 6e 74 20 69 6e 20 61 |ts argum|ent in a|
|00004890| 20 2a 5c 76 62 6f 78 2a | 20 74 68 65 0a 68 65 69 | *\vbox*| the.hei|
|000048a0| 67 68 74 20 6f 66 20 74 | 68 69 73 20 73 75 62 74 |ght of t|his subt|
|000048b0| 72 65 65 20 61 6e 64 20 | 73 75 72 72 6f 75 6e 64 |ree and |surround|
|000048c0| 69 6e 67 20 73 70 61 63 | 65 2e 20 20 57 65 20 61 |ing spac|e. We a|
|000048d0| 6c 73 6f 20 64 65 66 69 | 6e 65 20 68 65 72 65 0a |lso defi|ne here.|
|000048e0| 2a 5c 74 72 65 65 68 61 | 6c 66 72 75 6c 65 2a 2c |*\treeha|lfrule*,|
|000048f0| 20 74 68 65 20 6d 61 63 | 72 6f 20 63 61 6c 6c 65 | the mac|ro calle|
|00004900| 64 20 74 6f 20 6d 61 6b | 65 20 61 6e 20 2a 5c 68 |d to mak|e an *\h|
|00004910| 72 75 6c 65 2a 20 68 61 | 6c 66 20 74 68 65 20 68 |rule* ha|lf the h|
|00004920| 65 69 67 68 74 0a 6f 66 | 20 74 68 65 20 73 75 62 |eight.of| the sub|
|00004930| 74 72 65 65 20 28 77 69 | 74 68 20 68 61 6c 66 20 |tree (wi|th half |
|00004940| 74 68 65 20 68 65 69 67 | 68 74 20 6f 66 20 74 68 |the heig|ht of th|
|00004950| 65 20 68 6f 72 69 7a 6f | 6e 74 61 6c 20 63 6f 6e |e horizo|ntal con|
|00004960| 6e 65 63 74 69 6f 6e 0a | 61 64 64 65 64 20 74 6f |nection.|added to|
|00004970| 20 6d 61 6b 65 20 74 68 | 65 20 63 6f 72 6e 65 72 | make th|e corner|
|00004980| 73 20 63 6f 6d 65 20 6f | 75 74 20 73 71 75 61 72 |s come o|ut squar|
|00004990| 65 29 2e 0a 3c 2f 70 3e | 0a 3c 70 3e 5c 76 62 0a |e)..</p>|.<p>\vb.|
|000049a0| 5c 64 65 66 5c 74 72 65 | 65 63 74 72 62 6f 78 23 |\def\tre|ectrbox#|
|000049b0| 31 7b 5c 76 62 6f 78 20 | 74 6f 20 5c 74 72 65 65 |1{\vbox |to \tree|
|000049c0| 68 65 69 67 68 74 7b 5c | 76 66 69 6c 20 23 31 5c |height{\|vfil #1\|
|000049d0| 76 66 69 6c 0a 5c 64 65 | 66 5c 74 72 65 65 68 61 |vfil.\de|f\treeha|
|000049e0| 6c 66 72 75 6c 65 7b 5c | 64 69 6d 65 6e 30 3d 5c |lfrule{\|dimen0=\|
|000049f0| 74 72 65 65 68 65 69 67 | 68 74 20 20 20 25 20 47 |treeheig|ht % G|
|00004a00| 65 74 20 74 6f 74 61 6c | 20 68 65 69 67 68 74 2e |et total| height.|
|00004a10| 0a 20 20 5c 64 69 76 69 | 64 65 5c 64 69 6d 65 6e |. \divi|de\dimen|
|00004a20| 30 20 32 5c 61 64 76 61 | 6e 63 65 5c 64 69 6d 65 |0 2\adva|nce\dime|
|00004a30| 6e 30 20 30 2e 32 70 74 | 20 25 20 44 69 76 69 64 |n0 0.2pt| % Divid|
|00004a40| 65 20 62 79 20 74 77 6f | 2c 20 61 64 64 20 68 61 |e by two|, add ha|
|00004a50| 6c 66 20 68 6f 72 69 7a | 20 68 65 69 67 68 74 2e |lf horiz| height.|
|00004a60| 0a 20 20 5c 68 72 75 6c | 65 20 77 69 64 74 68 20 |. \hrul|e width |
|00004a70| 30 2e 34 70 74 20 68 65 | 69 67 68 74 20 5c 64 69 |0.4pt he|ight \di|
|00004a80| 6d 65 6e 30 20 20 20 20 | 25 20 4d 61 6b 65 20 61 |men0 |% Make a|
|00004a90| 20 76 65 72 74 69 63 61 | 6c 20 72 75 6c 65 20 74 | vertica|l rule t|
|00004aa0| 68 61 74 20 68 69 67 68 | 2e 0a 5c 65 6e 64 76 62 |hat high|..\endvb|
|00004ab0| 0a 3c 2f 70 3e 0a 3c 70 | 3e 54 68 61 74 20 63 6f |.</p>.<p|>That co|
|00004ac0| 6d 70 6c 65 74 65 73 20 | 2a 5c 6d 61 6b 65 73 75 |mpletes |*\makesu|
|00004ad0| 62 74 72 65 65 2a 2e 20 | 20 49 66 20 74 68 69 73 |btree*. | If this|
|00004ae0| 20 73 75 62 74 72 65 65 | 20 68 61 73 20 6e 6f 20 | subtree| has no |
|00004af0| 73 75 62 2d 73 75 62 74 | 72 65 65 73 0a 75 6e 64 |sub-subt|rees.und|
|00004b00| 65 72 20 69 74 2c 20 2a | 5c 6d 61 6b 65 74 72 65 |er it, *|\maketre|
|00004b10| 65 2a 20 77 69 6c 6c 20 | 6e 6f 77 20 72 75 6e 20 |e* will |now run |
|00004b20| 2a 5c 6d 61 6b 65 6c 65 | 61 66 2a 3b 20 74 68 69 |*\makele|af*; thi|
|00004b30| 73 20 6d 65 72 65 6c 79 | 20 61 64 64 73 20 74 68 |s merely| adds th|
|00004b40| 65 0a 74 72 65 65 20 74 | 65 78 74 20 74 6f 20 74 |e.tree t|ext to t|
|00004b50| 68 65 20 2a 5c 68 62 6f | 78 2a 20 6f 70 65 6e 65 |he *\hbo|x* opene|
|00004b60| 64 20 69 6e 20 2a 5c 6d | 61 6b 65 74 72 65 65 2a |d in *\m|aketree*|
|00004b70| 2e 20 20 4f 74 68 65 72 | 77 69 73 65 20 77 65 20 |. Other|wise we |
|00004b80| 63 61 6c 6c 0a 2a 5c 6d | 61 6b 65 70 61 72 65 6e |call.*\m|akeparen|
|00004b90| 74 2a 20 74 6f 20 61 74 | 74 61 63 68 20 74 68 65 |t* to at|tach the|
|00004ba0| 20 73 75 62 2d 73 75 62 | 74 72 65 65 73 20 61 6e | sub-sub|trees an|
|00004bb0| 64 20 63 6f 6e 6e 65 63 | 74 69 6e 67 20 72 75 6c |d connec|ting rul|
|00004bc0| 65 73 20 74 6f 20 74 68 | 65 0a 74 65 78 74 20 61 |es to th|e.text a|
|00004bd0| 74 20 74 68 65 20 72 6f | 6f 74 20 6f 66 20 74 68 |t the ro|ot of th|
|00004be0| 65 20 73 75 62 74 72 65 | 65 2e 0a 3c 2f 70 3e 0a |e subtre|e..</p>.|
|00004bf0| 3c 70 3e 5c 76 62 0a 5c | 64 65 66 5c 6d 61 6b 65 |<p>\vb.\|def\make|
|00004c00| 6c 65 61 66 7b 5c 62 6f | 78 5c 74 72 65 65 62 6f |leaf{\bo|x\treebo|
|00004c10| 78 20 20 20 20 20 20 20 | 20 20 20 20 20 20 25 20 |x | % |
|00004c20| 41 64 64 20 6c 65 61 66 | 20 62 6f 78 20 74 6f 20 |Add leaf| box to |
|00004c30| 68 6f 72 69 7a 20 6c 69 | 73 74 2e 0a 5c 64 65 66 |horiz li|st..\def|
|00004c40| 5c 6d 61 6b 65 70 61 72 | 65 6e 74 7b 5c 69 66 64 |\makepar|ent{\ifd|
|00004c50| 69 6d 5c 68 74 5c 74 72 | 65 65 62 6f 78 26 67 74 |im\ht\tr|eebox&gt|
|00004c60| 3b 5c 68 74 30 20 20 25 | 20 49 66 20 74 65 78 74 |;\ht0 %| If text|
|00004c70| 20 69 73 20 68 69 67 68 | 65 72 20 74 68 61 6e 20 | is high|er than |
|00004c80| 73 75 62 74 72 65 65 73 | 0a 20 20 20 20 5c 74 72 |subtrees|. \tr|
|00004c90| 65 65 68 65 69 67 68 74 | 3d 5c 68 74 5c 74 72 65 |eeheight|=\ht\tre|
|00004ca0| 65 62 6f 78 20 20 20 20 | 20 20 20 20 20 20 20 20 |ebox | |
|00004cb0| 20 25 20 2e 2e 75 73 65 | 20 74 68 61 74 20 68 65 | % ..use| that he|
|00004cc0| 69 67 68 74 2e 0a 20 20 | 5c 65 6c 73 65 20 5c 74 |ight.. |\else \t|
|00004cd0| 72 65 65 68 65 69 67 68 | 74 3d 5c 68 74 30 20 5c |reeheigh|t=\ht0 \|
|00004ce0| 66 69 20 20 20 20 20 20 | 20 20 20 20 20 20 25 20 |fi | % |
|00004cf0| 4f 74 68 65 72 77 69 73 | 65 20 75 73 65 20 68 65 |Otherwis|e use he|
|00004d00| 69 67 68 74 20 6f 66 20 | 73 75 62 74 72 65 65 73 |ight of |subtrees|
|00004d10| 2e 0a 20 20 5c 61 64 76 | 61 6e 63 65 5c 74 72 65 |.. \adv|ance\tre|
|00004d20| 65 77 69 64 74 68 2d 5c | 77 64 5c 74 72 65 65 62 |ewidth-\|wd\treeb|
|00004d30| 6f 78 20 20 20 20 20 20 | 20 20 25 20 54 61 6b 65 |ox | % Take|
|00004d40| 20 72 65 6d 61 69 6e 64 | 65 72 20 6f 66 20 6c 65 | remaind|er of le|
|00004d50| 76 65 6c 20 77 69 64 74 | 68 0a 20 20 5c 61 64 76 |vel widt|h. \adv|
|00004d60| 61 6e 63 65 5c 74 72 65 | 65 77 69 64 74 68 20 31 |ance\tre|ewidth 1|
|00004d70| 65 6d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |em | |
|00004d80| 20 20 25 20 2e 2e 61 66 | 74 65 72 20 61 63 63 6f | % ..af|ter acco|
|00004d90| 75 6e 74 69 6e 67 20 66 | 6f 72 20 74 65 78 74 20 |unting f|or text |
|00004da0| 61 6e 64 20 67 6c 75 65 | 2e 0a 20 20 5c 74 72 65 |and glue|.. \tre|
|00004db0| 65 63 74 72 62 6f 78 7b | 5c 62 6f 78 5c 74 72 65 |ectrbox{|\box\tre|
|00004dc0| 65 62 6f 78 5c 68 73 6b | 69 70 20 30 2e 32 65 6d |ebox\hsk|ip 0.2em|
|00004dd0| 20 25 20 41 64 64 20 74 | 65 78 74 2c 20 73 70 61 | % Add t|ext, spa|
|00004de0| 63 65 20 62 65 66 6f 72 | 65 20 63 6f 6e 6e 65 63 |ce befor|e connec|
|00004df0| 74 69 6f 6e 2e 0a 20 20 | 5c 74 72 65 65 63 74 72 |tion.. |\treectr|
|00004e00| 62 6f 78 7b 5c 68 72 75 | 6c 65 20 77 69 64 74 68 |box{\hru|le width|
|00004e10| 20 5c 74 72 65 65 77 69 | 64 74 68 5c 74 72 65 65 | \treewi|dth\tree|
|00004e20| 63 74 72 62 6f 78 7b 5c | 62 6f 78 30 20 25 20 41 |ctrbox{\|box0 % A|
|00004e30| 64 64 20 5c 68 72 75 6c | 65 2c 20 73 75 62 73 2e |dd \hrul|e, subs.|
|00004e40| 0a 5c 65 6e 64 76 62 0a | 3c 2f 70 3e 0a 3c 70 3e |.\endvb.|</p>.<p>|
|00004e50| 25 09 72 65 73 74 6f 72 | 65 20 2a 20 74 6f 20 74 |%.restor|e * to t|
|00004e60| 79 70 65 20 6f 72 64 69 | 6e 61 72 79 0a 5c 63 61 |ype ordi|nary.\ca|
|00004e70| 74 63 6f 64 65 26 6c 73 | 71 75 6f 3b 5c 2a 3d 31 |tcode&ls|quo;\*=1|
|00004e80| 32 0a 3c 2f 70 3e 0a 3c | 70 3e 5c 65 6e 64 69 6e |2.</p>.<|p>\endin|
|00004e90| 70 75 74 0a 25 5c 62 79 | 65 0a 3c 2f 70 3e 3c 68 |put.%\by|e.</p><h|
|00004ea0| 72 3e 0a 3c 70 3e 0a 20 | 3c 66 6f 6e 74 20 73 69 |r>.<p>. |<font si|
|00004eb0| 7a 65 3d 22 2d 31 22 3e | 0a 20 20 54 68 69 73 20 |ze="-1">|. This |
|00004ec0| 64 6f 63 75 6d 65 6e 74 | 20 77 61 73 20 67 65 6e |document| was gen|
|00004ed0| 65 72 61 74 65 64 20 6f | 6e 20 3c 69 3e 4e 6f 76 |erated o|n <i>Nov|
|00004ee0| 65 6d 62 65 72 20 32 34 | 2c 20 32 30 32 34 3c 2f |ember 24|, 2024</|
|00004ef0| 69 3e 20 75 73 69 6e 67 | 20 3c 61 20 68 72 65 66 |i> using| <a href|
|00004f00| 3d 22 68 74 74 70 3a 2f | 2f 77 77 77 2e 6e 6f 6e |="http:/|/www.non|
|00004f10| 67 6e 75 2e 6f 72 67 2f | 74 65 78 69 32 68 74 6d |gnu.org/|texi2htm|
|00004f20| 6c 2f 22 3e 3c 69 3e 74 | 65 78 69 32 68 74 6d 6c |l/"><i>t|exi2html|
|00004f30| 20 35 2e 30 3c 2f 69 3e | 3c 2f 61 3e 2e 0a 20 3c | 5.0</i>|</a>.. <|
|00004f40| 2f 66 6f 6e 74 3e 0a 20 | 3c 62 72 3e 0a 0a 3c 2f |/font>. |<br>..</|
|00004f50| 70 3e 0a 3c 2f 62 6f 64 | 79 3e 0a 3c 2f 68 74 6d |p>.</bod|y>.</htm|
|00004f60| 6c 3e 0a | |l>. | |
+--------+-------------------------+-------------------------+--------+--------+